Home » Database » Database miscellaneous » Question

Database miscellaneous

  1. 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?
    Πcourseldstudldsex = “female” (studinfo) × Πcourseheld(enroll)) – enroll)
    1. Courses in which all the female students are enrolled
    2. Courses in which a proper subset of female students are enrolled
    3. Courses in which only male students are enrolled
    4. None of the above
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.



Your comments will be displayed only after manual approval.