Download presentation
Presentation is loading. Please wait.
Published byArthur Goodwin Modified over 9 years ago
1
Enhanced Entity – Relationship (EER) and Object Modeling (Based on Chapter 4 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 4)
2
LIMITATIONS OF THE ER MODEL No relationship may be defined between an entity type and a relationship type No relationship may be defined between an entity type and a relationship type
3
LIMITATIONS OF THE ER MODEL No relationship may be defined between an entity type and a collection of entity types from which any one type may participate No relationship may be defined between an entity type and a collection of entity types from which any one type may participate (e.g. Entity type1 : POLICY-HOLDER may be an individual, multiple individuals, one organization, or many organizations Entity type2 : POLICY ) (e.g. Entity type1 : POLICY-HOLDER may be an individual, multiple individuals, one organization, or many organizations Entity type2 : POLICY )
4
Subclasses, Superclasses, and Specialization An entity type may have additional meaningful subgroupings of its entities An entity type may have additional meaningful subgroupings of its entities Example: EMPLOYEE may be further grouped into SECRETARY, ENGINEER, MANAGER, TECHNICIAN, SALARIED_EMPLOYEE, HOURLY_EMPLOYEE, … Example: EMPLOYEE may be further grouped into SECRETARY, ENGINEER, MANAGER, TECHNICIAN, SALARIED_EMPLOYEE, HOURLY_EMPLOYEE, …
7
Extended Entity-Relationship (EER)Model Incorporates Set-subset Relationships Incorporates Set-subset Relationships Incorporates Generalization Hierarchies Incorporates Generalization Hierarchies Constraints: Constraints: Coverage Constraints: Coverage Constraints: partial vs. total partial vs. total Disjointedness Constraint: Disjointedness Constraint: disjoint vs. overlapping disjoint vs. overlapping
8
Subclasses, Superclasses, and Specialization Each of these groupings is a subset of EMPLOYEE entities Each of these groupings is a subset of EMPLOYEE entities Each is called a subclass of EMPLOYEE Each is called a subclass of EMPLOYEE EMPLOYEE is the superclass for each of these subclasses EMPLOYEE is the superclass for each of these subclasses Called superclass/subclass relationships; for example:EMPLOYEE/SECRETARY, EMPLOYEE/TECHNICIAN Called superclass/subclass relationships; for example:EMPLOYEE/SECRETARY, EMPLOYEE/TECHNICIAN Also called IS-A relationship(SECRETARY IS-A EMPLOYEE, TECHNICIAN IS-A EMPLOYEE, … ) Also called IS-A relationship(SECRETARY IS-A EMPLOYEE, TECHNICIAN IS-A EMPLOYEE, … )
9
Specialization: Specialization: Is the process of defining a set of subclass of a superclass Is the process of defining a set of subclass of a superclass The set of subclasses based upon some distinguishing characteristic of the entities in the superclass The set of subclasses based upon some distinguishing characteristic of the entities in the superclass Example: {SECRETARY, ENGINEER, TECHNICIAN} is a specialization of EMPLOYEE based upon job type Example: {SECRETARY, ENGINEER, TECHNICIAN} is a specialization of EMPLOYEE based upon job type
12
Generalization The reverse of the specialization process The reverse of the specialization process Several classes with common features are generalized into a superclass; original classes become its subclasses Several classes with common features are generalized into a superclass; original classes become its subclasses Example: CAR, TRUCK generalized into VEHICLE; both CAR, TRUCK become subclasses of the superclass VEHICLE Example: CAR, TRUCK generalized into VEHICLE; both CAR, TRUCK become subclasses of the superclass VEHICLE
14
Generalization process reverse of specialization process Generalization process reverse of specialization process We can view {CAR, TRUCK} as a specialization of VEHICLE We can view {CAR, TRUCK} as a specialization of VEHICLE Alternatively, we can view VEHICLE as a generalization of CAR and TRUCK Alternatively, we can view VEHICLE as a generalization of CAR and TRUCK
15
Categories and Categorization Need to model a single superclass/subclass relationship with more than one superclass Need to model a single superclass/subclass relationship with more than one superclass Superclasses represent different types Superclasses represent different types Such a subclass called a category Such a subclass called a category Categorization is similar to Union type in C Categorization is similar to Union type in C
16
Example: database for vehicle registration, vehicle owner can be a person, a bank(holding a lien on a vehicle), or a company Example: database for vehicle registration, vehicle owner can be a person, a bank(holding a lien on a vehicle), or a company Category(subclass) OWNER is a subset of the union of the three superclasses COMPANY, BANK, and PERSON Category(subclass) OWNER is a subset of the union of the three superclasses COMPANY, BANK, and PERSON A category member must exist in at least one of its superclasses A category member must exist in at least one of its superclasses Categories displayed in EER diagram with U (union) symbol Categories displayed in EER diagram with U (union) symbol
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.