Observe that this provides an alternate solution to the query discussed in Ex-
ample 5.10.1. Namely, we use a subquery to compute the courses taken by each
student. Then, we test if ’cs310’ is one of these courses. We use the qualified at-
tribute STUDENTS.stno inside the subquery to differentiate between this input
parameter and the attribute stno of the table GRADES.
Sets of tuples produced by subqueries can be tested for emptiness using the
exists condition. Namely, the condition