Frage

What is the best approach to design a data model based on a generalization relationship. For example imagine there is a based class A and two derived class B and C that inherit class A. Now I want design data model. I have three choices

1) Create Table A and having a type column for specifying B and C data.

2) Create Table A, B and C Just like my class diagram and relate B and C to A.

3) Create Table A, B and C but don't relate B and C to A.

Any clue would be appreciated

War es hilfreich?

Lösung

Check out this article. Although it is written for JPA, it tells you the pros and cons of each of the strategies you mentioned.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top