For my university assignment I have to design some basic managment system for sicknesses and all for a school. I have decided to model some basic inheritance in the form of
- Person --> Student
- Person --> Staff
- Person --> Guardian
Person (PersonID, FirstName, LastName)
Student (StudentID (Which references the PersonID), ... )
The reason i decided to do this as I modeled this first in UML and had the inheritance in this.
I have another table which stored Incidents which have both StudentID, StaffID and GuardianID. However I was wondering how I would create a join in mysql which would display all three inherited people's names?
e.g.
Student.FirstName Student.LastName, Staff.FirstName, Staff.LastName etc...
How would I do this?
Or am i doing this completely wrong this way?
Thanks in advance.
http://pastebin.com/m263dd7 - Link to my DDL for the tables.