【发布时间】:2013-11-18 04:24:53
【问题描述】:
我正在尝试为医院 Oracle 数据库系统实现实体关系。
我很困惑是否应该将下表分开或将它们合并为 1。
- Supply
ItemNo (PK) , Name, ItemDescription, QuantityInStock, BackOrderLevel, CostPerUnit
- PharmaceuticalSupply
DrugNo (PK) , Dosage, MethodOfAdmin
基本上在我的 ERD 中,我将 PharmaceuticalSupply 指向 Supply 作为一个子集,它继承了该属性但也有其他属性。我这样做有错吗?
【问题讨论】:
-
我会将它合并到 Supply 中,使用 Type 属性指定为 Pharmaceutical 类型,它将简化您的 sql 和应用程序代码。
-
确实有道理。非常感谢
标签: oracle entity-relationship oracle-sqldeveloper er-diagrams entity-relationship-model