credit:
https://www.cs.uct.ac.za/mit_notes/database/htmls/chp07.html
For anyone that was looking at the anonymous superclass inquiry on here....
I found this useful but it probably reinforces the lecture notes.
Method 1
All the entities in the relationship are mapped to individual tables.
Student (Regno, name)
PosGrad (Regno, supervisor)
UnderGrad (Regno, points)
Method 2
Only subclasses are mapped to tables. The attributes in the superclass are duplicated in all subclasses.
PosGrad (Regno, name, supervisor)
UnderGrad (Regno, name, points)
This method is most preferred when inheritance is disjoint (mutually exclusive) and complete, e.g. every student is either PosGrad or UnderGrad and nobody is both.
Method 3
Only the superclass is mapped to a table. The attributes in the subclasses are taken to the superclass.
Student (Regno, name, supervisor, points)
This method will introduce null values. When we insert an undergraduate record in the table, the supervisor column value will be null. In the same way, when we insert a postgraduate record in the table, the points value will be null.