I have a database assignment which i have to create some relational algebra for two problems. I feel fairly all right with the majority of it, but I just get confused when trying to project attributes out of a table which is joined to another table.
for example is this correct?
Q1) List the details of incidences with no calls made, so that the receptionist knows which incidents still need to be called in.
RESULT <-- PROJECT<STUDENT.FirstName, STUDENT.LastName, STAFF.FirstName, STAFF.INCIDENT.LastName, INCIDENT.DateTimeReported, INCIDENT.NatureOfIllness(SELECTINCIDENT.DecisionMade = ''(Staff RIGHT JOIN<STAFF.StaffID = INCIDENT.StaffID>(INCIDENT LEFT JOIN<INCIDENT.StudentID = STUDENT.StudentID>(STUDENT))))
The SQL which i am trying to interpret into relational algebra is:
SELECT s.FirstName, s.LastName, st.FirstName, st.LastName, i.DateTimeReported, i.NatureOfIllness
FROM Student s RIGHT JOIN Incident i ON s.StudentID = i.StudentID LEFT JOIN Staff st ON st.StaffID = i.StaffID
WHERE i.DecisionMade = ''
Any pointers of advice would be much appreciated.