NOTE: relation EXAMS stores the registration number (attribute Student) of students that passed the exam for a given course (attribute Course is the number of course, not the name of the course), the grade and the date of the exam.
Formulate in relational algebra the query that retrieves for every course number in the Science faculty, the registration number and surname of students who passed the exam for such a course during the period 01/05/2010-15/05/2010.
PROJECT Number, RegNumber, Surname (RESTRICT date > 30/04/2010 AND date < 16/05/2010 AND Grade > ‘E’(Courses JOIN r.number=Course Exams AND Students JOIN r.RegNumber = Student Exams))
Do you guys think my answer is correct? If not, what should I change? Thanks
Not too sure about the syntax, but one point about the RESTRICT clause, does the Date attribute include a time portion? If it does, then someone who takes and passes the exam at noon on 30/04/2010 will show up in your result set. Also, I don't see anything about the Science faculty. Lastly, since I don't know the syntax you are using, I see r.Number, and r.RegNumber, is "r" an alias for the Exams table? Does it need to be declared?