[英]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.