문제

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

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top