Can people give their thoughts on the following sernario.
When I have been taught database design in the past it has always been with the aid of examples that have very distinct entities. For example: People loan copies of books.
For the sake of simplicity say you have a booking system.
Event(EventID, EventName, EventDate)
Person(PersonID, Firstname, Surname, ... Postcode)
Booking(BookingID, Person, Event, Guests)
This is the same level of simplicity. However I have never been shown an example where the person entity is more specialised.
What if a database needs to hold details on people of different types? Say you hold college students, school techers and business owners. The details that is required on each is:
Student(Firstname, Surname, College, Address, DOB)
Teacher(Firstname, Surname, School, JobTitle)
BusinessOwner(Firstname, Surname, Business)
I assume that this requires three tables as appose to the one Person table but how does the booking relationship work?
How would you link Events to perople of all three types?
When I have been taught database design in the past it has always been with the aid of examples that have very distinct entities. For example: People loan copies of books.
For the sake of simplicity say you have a booking system.
Event(EventID, EventName, EventDate)
Person(PersonID, Firstname, Surname, ... Postcode)
Booking(BookingID, Person, Event, Guests)
This is the same level of simplicity. However I have never been shown an example where the person entity is more specialised.
What if a database needs to hold details on people of different types? Say you hold college students, school techers and business owners. The details that is required on each is:
Student(Firstname, Surname, College, Address, DOB)
Teacher(Firstname, Surname, School, JobTitle)
BusinessOwner(Firstname, Surname, Business)
I assume that this requires three tables as appose to the one Person table but how does the booking relationship work?
How would you link Events to perople of all three types?