Quote:
|
Originally Posted by pootle flump
Further advantage - helps avoid update anomolies. A female teacher may parent a student and be a student themselves. Then she gets married and changes her last name. Supertype - one change. Three *broadly* duplicated tables - three updates.
|
I agree that in the case where the sane person may be in the same time a student a parent and a teacher, then the supertype/subtype model maintains the redundancies to a minimum and only with separate tables it will be a mess.
And I don't see any other way you could do it.
However if the requirement is that one person can be only a student/parent/teacher at a time then I see some disadvantages as well:
- you have to maintin from the application level the logic on which table to updated if some fields change. As you said, if she changes her name you have to update the base table, but if she changes for example the university then you have to update the students table.
- the same for inserts, from the application you should know that to insert a new student it's acctually two inserts in two different tables.
- I don't know how easy and fast it is to retrieve the data from the base table and the subtables, I assume you would have to do at least a join. For the denormalized tables(only subtype tables without a common base table) you do only one select.