Consider the following relational database schemes:
COURSES (Cno,name)
PRE-REQ(Cno, pre-Cno)
COMPLETED (student_no, Cno)
COURSES gives the number and name of all the available courses.
PRE-REQ gives the information about which courses are pre-requisites for a given course.
COMPLETED indicates what courses have been completed by students
Express the following using relational algebra:
List all the courses for which a student with student_no = 2310 has completed all the pre-requisites.
the question can be solved by SQL query but unable to derive equivalent relational algebra.
this may be the correct answer
ΠCno(PRE-REQ) - ΠCno( PRE-REQ - (COMPLETED ⋈COMPLETED.Cno=pre-Cno ^ student_no=2310 PRE-REQ ))
Here's an answer in the TUTORIAL D variant of RA:
(This uses some of the recently introduced syntactic sugar and alternative syntax compared to Date & Darwen's textbooks.)