GATE CS 2004 · SQL Queries

MCQ · 1 mark · Problem DBMS-SQL-0145

Consider the following relation schema pertaining to a students database: Students (\(\underline{rollno}\), name, address)Enroll (\(\underline{rollno}\) ,\(\underline{courseno}\), coursename) Where the primary keys are shown underlined. The number of tuples in the student and Enroll tables are 120 and 8 respectively. What are the maximum and minimum number of tuples that can be present in (Student * Enroll), where '*' denotes natural join?
  1. A
    8,8
  2. B
    120,8
  3. C
    960,8
  4. D
    960,120

Solve it on GATE DA practice →More Relational Model & SQL problems

Show the worked solutionThe natural join is on rollno, which is the primary key of Students, and every Enroll.rollno refers to an existing student.\[\boxed{\text{each Enroll tuple joins with exactly one Students tuple}}\]So the join always has exactly as many tuples as Enroll: maximum 8 and minimum 8.Answer: A

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com