24
Queries
•Find all courses that “Mary” takes
•
•
•
•
•What happens behind the scene ?
–Query processor figures out how to answer the query efficiently.
SELECT  C.name
FROM     Students S, Takes T, Courses C
WHERE  S.name=“Mary” and
                S.ssn = T.ssn and T.cid = C.cid