Learning Objectives
- About the extended entity relationship (EER) model
- How entity clusters are used to represent multiple entities and relationships不太會用到
- The characteristics of good primary keys and how to select them
- How to use flexible solutions for special data-modeling cases
Extended Entity Relationship Model (EERM)
- Result of adding more semantic constructs to the original entity relationship (ER) model 把OOP、ERM的概念摻在一起做成EERM
- EER diagram (EERD): Uses the EER model
Entity Supertypes and Subtypes
可以用OOP的繼承來想像:
- Entity supertype: Generic entity type related to one or more entity subtypes 大家都有的type,稱為較為上層的關係
- Contains common characteristics
- Entity subtype: Contains unique characteristics of each entity subtype 通常是獨特的東西,小的
- Criteria to determine the usage
- There must be different, identifiable kinds of the entity in the user’s environment
- The different kinds of instances should each have one or more attributes that are unique to that kind of instance

多個attribute是獨有的,都放在大的table內,會造成很多null。
Pilot → subtype
Subtype example
- Assume that mechanics and accountants also each have attributes that are unique to them, respectively, and that clerks do not. In that case, MECHANIC and ACCOUNTANT would also be legitimate subtypes of EMPLOYEE because they are identifiable kinds of employees and have unique attributes.
- CLERK would not be an acceptable subtype of EMPLOYEE because it only satisfies one of the criteria—it is an identifiable kind of employee—but none of the attributes are unique to just clerks.
- 找不到特殊屬性就不用新增