-
Information about a collection of students is given by the relation studinfo (studld, name, sex). The relation enroll (studld, courseld) gives which student has enrolled for (or taken) what course(s). Assume that every course is taken by at least one male and at least one female student. What does the following relational algebra expression represent?
Πcourseld (Πstudld(σsex = “female” (studinfo) × Πcourseheld(enroll)) – enroll)
-
- Courses in which all the female students are enrolled
- Courses in which a proper subset of female students are enrolled
- Courses in which only male students are enrolled
- None of the above
- Courses in which all the female students are enrolled
Correct Option: B
(σsex = “female” (studinfo) tells that students are females.
Πcourseld (enroll) gives the Id of the course in which to enroll.
ΠstudId (enroll) tells regarding a proper subset of females that are enrolled.
Finally, Πcourseheld tells Course in which a proper subset of female students are enrolled.