Hello
I have just designed a database with an inheritance relationship. I have supertype as a table on its own. Each subtype would also have a table too.
i need to reference the supertype with the subtype.
supertype table:
- id (PK)
- ..other fields
each subtype table:
- id (PK)
- ..unique sub fields
Should i make subtype id a FK as well as a PK so it can reference its parent supertype? OR should i introduce an additional field that does the referencing like:
subtype table:
- id (PK)
- unique sub fields..
- supertype_id (FK) which references the parent
??
Also - should my subtype PK id be auto-increment?
thanks in advance