You have three options:
1 - Table behind the hierarchy : Good performance, as one physical table is required. You need to add the discriminator field to Person - for example, "PersonType". The problem with this approach (what I found) is that you will end up with a lot of fields with a null value, and navigational properties between derived types are complex (in my experience).
2 - Type of table : Requires separate tables, but suitable for flexibility if you want a different type of "Person".
3 - Table-Per Concrete Type . You have no experience with this, so he cannot comment on it. AFAIK is very similar to TPT.
I would probably go with TPT, simply because it makes IMO easier.
Having said that, the field in the Contractor and Employee tables is of the same type, so you can generalize this as one field with TPH. But I guess that is not a complete model.
Steps for the first model:
- Add these three objects to an empty EDMX.
- Mark "Face" as abstract
- Set Contractor and Employee to Face. (Add → Inheritance)
- Remove the identifier fields from the "Employee" and "Contractor" objects (optional - it inherits the identifier from "Person").
- Generate a database from the model.
RPM1984
source share