[英]In the EER(Extended ER Diagram), can entity have more than one subclasses?
在我現在所做的問題中,給出了兩個令人困惑的句子:
1. A property can be either be a house or an apartment. For a house it records ..bula bula
For an apartment, it records .. bula bula
2. A property can be either for sale or rent, or for both. If a property is for sale, it
records .. bula bula. If the property is for rent, it records .. bula bula
這兩個是同一個問題。 我是否必須通過使用子類或如何表示它?
非常感謝。
Sjoerd的回答是正確的。
ER建模告訴您如何繪制子類圖,但它沒有告訴您如何實現它們。 也不應該。
如果您對設計實現子類的SQL表感興趣,請在SO中查找這些主題或其標記:
Single Table Inheritance
Class Table Inheritance
Shared Primary Key
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.