我是关系代数的新手,对于我的任务,我必须创建两个。我已经写出了我在 SQL 中遇到的问题,但我不确定如何在关系代数中表示这种连接。任何帮助/指针将不胜感激。
SELECT ps.FirstName AS StudentFirstName, ps.LastName AS StudentLastName, pst.FirstName AS StaffFirstName , pst.LastName AS StaffLastName, pg.FirstName AS GuardianFirstName, pg.LastName AS GuadianLastName, i.DateTimeReported, i.NatureOfIllness
FROM Incident i
JOIN Student s USING (StudentID)
JOIN Person ps ON (s.StudentID = ps.PersonID)
JOIN Staff st USING (StaffID)
JOIN Person pst ON (st.StaffID = pst.PersonID)
JOIN Guardian g USING (GuardianID)
JOIN Person pg ON (g.GuardianID = pg.PersonID)
WHERE i.DecisionMade IS NULL;