Enhanced Entity Relationship EER Model Presented by James
Enhanced Entity Relationship (EER) Model Presented by James Cohen December 4, 2002 Data Modeling – James Cohen
The Entity (Review) l Entity Relationship (ER) Model – represents an object l l Physical – person, car Conceptual – school, company ER model is based on the perception of the real world as a collection of objects with attributes Attributes – describe the entity l l l Single, Multi-value Composite, Simple Derived, Stored December 4, 2002 Data Modeling – James Cohen
What is an EER Model? Enhanced Entity Relationship (EER) – Data Modeling l EER shows complex relationships between objects in a database (multimedia, geographical). l Concepts of subclasses and superclasses, specializations and generalizations. l Put concepts in diagram to form EER model l December 4, 2002 Data Modeling – James Cohen
Specialization Subgrouping into subclasses (top-down approach) l Example: EMPLOYEE -> SECRETARY MANAGER, etc. l Inheritance – Inherit attributes and relationships from superclass (Name, Birthdate, etc. ) l Subclasses may have uniqe attributes l SECRETARY has Typing. Speed attribute, MANAGER has Business. Unit. Managed, etc. December 4, 2002 Data Modeling – James Cohen
Specialization (cont. ) SSN Name EMPLOYEE Job. Type U SECRETARY Pay. Method DEPARTMENT U ENGINEER U U SOFTWARE_ENGINEER December 4, 2002 WORKS_IN SALARY_EMP. Data Modeling – James Cohen U HOURLY_EMP.
Model Shapes When you have more than one subclass based on the same defining attribute (Job. Type), use l To show class/subclass relationships, use U l l Used l for relationships between entity types To show relationship between two different entity types, use December 4, 2002 Data Modeling – James Cohen
Generalization Reverse processes of defining subclasses (bottom-up approach) l Bring together common attributes in entities l Example: CAR (with attributes color, price, max speed) and TRUCK (with attributes color, price, tonnage) can be generalized into VEHICLE (with attributes color and price). December 4, 2002 Data Modeling – James Cohen
Hierarchies and Lattices l Hierarchy – subclass participates in one class/subclass relationship SOFTWARE ENGINEER has all the attributes of an ENGINEER and EMPLOYEE U SECRETARY U EMPLOYEE ENGINEER U SOFTWARE ENGINEER December 4, 2002 Data Modeling – James Cohen
Hierarchies and Lattices l Lattice – subclass participates in more than one class/subclass relationship ENGINEERING MANAGER (shared subclass) is a MANGER and an ENGINEER U U ENGINEER U SECRETARY U EMPLOYEE MANAGER U ENGINEERING MANAGER December 4, 2002 Data Modeling – James Cohen
Categories l Models a class/subclass with more than one superclass of distinct entity types. Attribute inheritance is selective. PERSON BANK U U OWNER December 4, 2002 Data Modeling – James Cohen COMPANY The category, OWNER, is a subclass of the union of PERSON, BANK, and COMPANY. OWNER is either a PERSON or a BANK or a COMPANY
Constraints l l Disjoint – an entity can be a member of at most one subclass of a specialization d Overlap – an entity may belong to more than one subclass of a specialization o Total specialization – each entity of a superclass belongs to some subclass of a specialization Partial specialization – each entity of a superclass does not have to belong to some subclass of a specialization December 4, 2002 Data Modeling – James Cohen
Putting It All Together Example (Figure 4. 7 in textbook) December 4, 2002 Data Modeling – James Cohen
- Slides: 12