GATE Exam  >  GATE Questions  >  Consider the following set of relation schema... Start Learning for Free
Consider the following set of relation schemas
STUDENTS (ROLLNO, NAME, DOB, AGE)
ENROLL (ROLLNO, COURSENO)
COURSES (COURSENO, COURSENAME, INSTRUCTOR)
GRADES (ROLLNO, COURSENO, GRADE)
Consider the following SQL Query: -
Select distinct Name, Rollno
From Students, Courses, Grades
Where Students.Rollno = Grades.Rollno) and (Courses.Instructor = ‘Mohan’) and (Courses.Courseno = Grades.Courseno) and Grades.Grade = ‘A’
Which of the following sets is computed by the above query?
  • a)
    Name and Rollno of the students who have got A grade in all courses.
  • b)
    Name and rollno of the students who have got an A grade in all courses taught by Mohan as instructor.
  • c)
    Name and rollno of the students who have got an A grade in at least one course taught by mohan as instructor.
  • d)
    None of the above.
Correct answer is option 'C'. Can you explain this answer?
Verified Answer
Consider the following set of relation schemasSTUDENTS (ROLLNO, NAME, ...
Use of distinct selects Name and rollno only once. So, irrespective of how many times a person has got an A grade, his name would appear only once in the output.
View all questions of this test
Most Upvoted Answer
Consider the following set of relation schemasSTUDENTS (ROLLNO, NAME, ...
Explanation:
Students who have got an A grade in at least one course taught by Mohan as an instructor are computed by the given SQL query. Let's break down the query and understand it step by step:
- From Clause: The query selects data from the Students, Courses, and Grades tables.
- Where Clause:
- Students.Rollno = Grades.Rollno: This condition ensures that only records where the Rollno matches in the Students and Grades tables are selected.
- Courses.Instructor = 'Mohan': This condition filters courses taught by the instructor named 'Mohan'.
- Courses.Courseno = Grades.Courseno: This condition ensures that only courses with matching Course numbers in the Courses and Grades tables are selected.
- Grades.Grade = 'A': This condition selects only records where the Grade is 'A'.
- Select Clause: The query selects distinct Name and Rollno from the result set.
Therefore, the query computes the Name and Rollno of the students who have got an A grade in at least one course taught by Mohan as an instructor. This is because the query includes conditions related to the instructor being 'Mohan' and the grade being 'A'. Students meeting these conditions will be included in the result set.
Explore Courses for GATE exam
Consider the following set of relation schemasSTUDENTS (ROLLNO, NAME, DOB, AGE)ENROLL (ROLLNO, COURSENO)COURSES (COURSENO, COURSENAME, INSTRUCTOR)GRADES (ROLLNO, COURSENO, GRADE)Consider the following SQL Query: -Select distinct Name, RollnoFrom Students, Courses, GradesWhere Students.Rollno = Grades.Rollno) and (Courses.Instructor = ‘Mohan’) and (Courses.Courseno = Grades.Courseno) and Grades.Grade = ‘A’Which of the following sets is computed by the above query?a)Name and Rollno of the students who have got A grade in all courses.b)Name and rollno of the students who have got an A grade in all courses taught by Mohan as instructor.c)Name and rollno of the students who have got an A grade in at least one course taught by mohan as instructor.d)None of the above.Correct answer is option 'C'. Can you explain this answer?
Question Description
Consider the following set of relation schemasSTUDENTS (ROLLNO, NAME, DOB, AGE)ENROLL (ROLLNO, COURSENO)COURSES (COURSENO, COURSENAME, INSTRUCTOR)GRADES (ROLLNO, COURSENO, GRADE)Consider the following SQL Query: -Select distinct Name, RollnoFrom Students, Courses, GradesWhere Students.Rollno = Grades.Rollno) and (Courses.Instructor = ‘Mohan’) and (Courses.Courseno = Grades.Courseno) and Grades.Grade = ‘A’Which of the following sets is computed by the above query?a)Name and Rollno of the students who have got A grade in all courses.b)Name and rollno of the students who have got an A grade in all courses taught by Mohan as instructor.c)Name and rollno of the students who have got an A grade in at least one course taught by mohan as instructor.d)None of the above.Correct answer is option 'C'. Can you explain this answer? for GATE 2024 is part of GATE preparation. The Question and answers have been prepared according to the GATE exam syllabus. Information about Consider the following set of relation schemasSTUDENTS (ROLLNO, NAME, DOB, AGE)ENROLL (ROLLNO, COURSENO)COURSES (COURSENO, COURSENAME, INSTRUCTOR)GRADES (ROLLNO, COURSENO, GRADE)Consider the following SQL Query: -Select distinct Name, RollnoFrom Students, Courses, GradesWhere Students.Rollno = Grades.Rollno) and (Courses.Instructor = ‘Mohan’) and (Courses.Courseno = Grades.Courseno) and Grades.Grade = ‘A’Which of the following sets is computed by the above query?a)Name and Rollno of the students who have got A grade in all courses.b)Name and rollno of the students who have got an A grade in all courses taught by Mohan as instructor.c)Name and rollno of the students who have got an A grade in at least one course taught by mohan as instructor.d)None of the above.Correct answer is option 'C'. Can you explain this answer? covers all topics & solutions for GATE 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider the following set of relation schemasSTUDENTS (ROLLNO, NAME, DOB, AGE)ENROLL (ROLLNO, COURSENO)COURSES (COURSENO, COURSENAME, INSTRUCTOR)GRADES (ROLLNO, COURSENO, GRADE)Consider the following SQL Query: -Select distinct Name, RollnoFrom Students, Courses, GradesWhere Students.Rollno = Grades.Rollno) and (Courses.Instructor = ‘Mohan’) and (Courses.Courseno = Grades.Courseno) and Grades.Grade = ‘A’Which of the following sets is computed by the above query?a)Name and Rollno of the students who have got A grade in all courses.b)Name and rollno of the students who have got an A grade in all courses taught by Mohan as instructor.c)Name and rollno of the students who have got an A grade in at least one course taught by mohan as instructor.d)None of the above.Correct answer is option 'C'. Can you explain this answer?.
Solutions for Consider the following set of relation schemasSTUDENTS (ROLLNO, NAME, DOB, AGE)ENROLL (ROLLNO, COURSENO)COURSES (COURSENO, COURSENAME, INSTRUCTOR)GRADES (ROLLNO, COURSENO, GRADE)Consider the following SQL Query: -Select distinct Name, RollnoFrom Students, Courses, GradesWhere Students.Rollno = Grades.Rollno) and (Courses.Instructor = ‘Mohan’) and (Courses.Courseno = Grades.Courseno) and Grades.Grade = ‘A’Which of the following sets is computed by the above query?a)Name and Rollno of the students who have got A grade in all courses.b)Name and rollno of the students who have got an A grade in all courses taught by Mohan as instructor.c)Name and rollno of the students who have got an A grade in at least one course taught by mohan as instructor.d)None of the above.Correct answer is option 'C'. Can you explain this answer? in English & in Hindi are available as part of our courses for GATE. Download more important topics, notes, lectures and mock test series for GATE Exam by signing up for free.
Here you can find the meaning of Consider the following set of relation schemasSTUDENTS (ROLLNO, NAME, DOB, AGE)ENROLL (ROLLNO, COURSENO)COURSES (COURSENO, COURSENAME, INSTRUCTOR)GRADES (ROLLNO, COURSENO, GRADE)Consider the following SQL Query: -Select distinct Name, RollnoFrom Students, Courses, GradesWhere Students.Rollno = Grades.Rollno) and (Courses.Instructor = ‘Mohan’) and (Courses.Courseno = Grades.Courseno) and Grades.Grade = ‘A’Which of the following sets is computed by the above query?a)Name and Rollno of the students who have got A grade in all courses.b)Name and rollno of the students who have got an A grade in all courses taught by Mohan as instructor.c)Name and rollno of the students who have got an A grade in at least one course taught by mohan as instructor.d)None of the above.Correct answer is option 'C'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider the following set of relation schemasSTUDENTS (ROLLNO, NAME, DOB, AGE)ENROLL (ROLLNO, COURSENO)COURSES (COURSENO, COURSENAME, INSTRUCTOR)GRADES (ROLLNO, COURSENO, GRADE)Consider the following SQL Query: -Select distinct Name, RollnoFrom Students, Courses, GradesWhere Students.Rollno = Grades.Rollno) and (Courses.Instructor = ‘Mohan’) and (Courses.Courseno = Grades.Courseno) and Grades.Grade = ‘A’Which of the following sets is computed by the above query?a)Name and Rollno of the students who have got A grade in all courses.b)Name and rollno of the students who have got an A grade in all courses taught by Mohan as instructor.c)Name and rollno of the students who have got an A grade in at least one course taught by mohan as instructor.d)None of the above.Correct answer is option 'C'. Can you explain this answer?, a detailed solution for Consider the following set of relation schemasSTUDENTS (ROLLNO, NAME, DOB, AGE)ENROLL (ROLLNO, COURSENO)COURSES (COURSENO, COURSENAME, INSTRUCTOR)GRADES (ROLLNO, COURSENO, GRADE)Consider the following SQL Query: -Select distinct Name, RollnoFrom Students, Courses, GradesWhere Students.Rollno = Grades.Rollno) and (Courses.Instructor = ‘Mohan’) and (Courses.Courseno = Grades.Courseno) and Grades.Grade = ‘A’Which of the following sets is computed by the above query?a)Name and Rollno of the students who have got A grade in all courses.b)Name and rollno of the students who have got an A grade in all courses taught by Mohan as instructor.c)Name and rollno of the students who have got an A grade in at least one course taught by mohan as instructor.d)None of the above.Correct answer is option 'C'. Can you explain this answer? has been provided alongside types of Consider the following set of relation schemasSTUDENTS (ROLLNO, NAME, DOB, AGE)ENROLL (ROLLNO, COURSENO)COURSES (COURSENO, COURSENAME, INSTRUCTOR)GRADES (ROLLNO, COURSENO, GRADE)Consider the following SQL Query: -Select distinct Name, RollnoFrom Students, Courses, GradesWhere Students.Rollno = Grades.Rollno) and (Courses.Instructor = ‘Mohan’) and (Courses.Courseno = Grades.Courseno) and Grades.Grade = ‘A’Which of the following sets is computed by the above query?a)Name and Rollno of the students who have got A grade in all courses.b)Name and rollno of the students who have got an A grade in all courses taught by Mohan as instructor.c)Name and rollno of the students who have got an A grade in at least one course taught by mohan as instructor.d)None of the above.Correct answer is option 'C'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider the following set of relation schemasSTUDENTS (ROLLNO, NAME, DOB, AGE)ENROLL (ROLLNO, COURSENO)COURSES (COURSENO, COURSENAME, INSTRUCTOR)GRADES (ROLLNO, COURSENO, GRADE)Consider the following SQL Query: -Select distinct Name, RollnoFrom Students, Courses, GradesWhere Students.Rollno = Grades.Rollno) and (Courses.Instructor = ‘Mohan’) and (Courses.Courseno = Grades.Courseno) and Grades.Grade = ‘A’Which of the following sets is computed by the above query?a)Name and Rollno of the students who have got A grade in all courses.b)Name and rollno of the students who have got an A grade in all courses taught by Mohan as instructor.c)Name and rollno of the students who have got an A grade in at least one course taught by mohan as instructor.d)None of the above.Correct answer is option 'C'. Can you explain this answer? tests, examples and also practice GATE tests.
Explore Courses for GATE exam
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev