Advice on SQL and records
From: <fran_beta_at_hotmail.com>
Date: 21 Aug 2005 01:02:56 -0700
Message-ID: <1124611376.749896.208510_at_o13g2000cwo.googlegroups.com>
I'm teaching in computing. A question appeared in a trial paper recently and I'm trying to establish whether the suggested answer is correct.
Date: 21 Aug 2005 01:02:56 -0700
Message-ID: <1124611376.749896.208510_at_o13g2000cwo.googlegroups.com>
I'm teaching in computing. A question appeared in a trial paper recently and I'm trying to establish whether the suggested answer is correct.
The question was:
SELECT Students.Surname, Students.Name FROM Courses, Classes, StudentClasses, Students WHERE Courses.CourseID="10MA"
AND
Courses.CourseID=Classes.CourseID
AND
Classes.ClassID=StudentClasses.ClassID AND
StudentClasses.StudentID=STudents.StudentID
ORDER BY Students.Surname, Students.Name
Which of the tables is likely to contain the most records?
The suggested answer from Courses; Classes; StudentClassses and Students was:
StudentClasses
How would this be determined? Why wouldn't Students contain the most records?
Thanks
Fran Received on Sun Aug 21 2005 - 10:02:56 CEST