ER model
ER model包含entity, attibutes, relationship。
ER model的relationship有multiplicity: cardinality, participation.
EER model
就比ER model多了一个specialization/generalization,也就是superclass/subclass。
两个constraints: participation constraint, disjoint constraint.
- participation constraint: mandatory/optional;
- disjoint constraint: or/and.
那么如何将superclass/subclass转化成一张张形象的tables呢?
以optional, and为例。staff的成员可以不属于任何一个子类,也可以属于多个子类。因此,应该为那些不属于任何一个子类的staff成员建一张超类的表,然后为所有的子类再建一张表。
Database Design Methodology
Step 1 Build conceptual data model(创建于检查ER图)
Step 2 Build and validate logical data model(将ER图映射为表)
Step 3 Translate logical data model for target DBMS(为目标DBMS转换全局)
Step 4 Design file organizations and indexes
Step 5 Dsign user views
Step 6 Design security mechanisms
Step 7 Consider the introduction of controlled redundancy
Step 8 Monitor and tune the operational system