SQL based models provide only
has a relationships between entities. SQL database management systems dont support type inheritance -- and even when it's available, it's usually proprietary or incomplete
There are four different approaches to representing an class hieritance hierarchy:
- Table per concrete class with implicit polymorphism -- Use no explicit inheritance mapping, and default runtime polymorphic behavior.
- Table per concrete class -- Discard polymorphism and inheritance relationships completely from the SQL schema.
- Table per class hierarchy -- Enable polymorphism by denormalizing the SQL schema, and utilize a type discriminator column that holds type information.
- Table per subclass -- Represent is
a(inheritance) relationships as
has a (foreign key) relationships.