Presentation is loading. Please wait.

Presentation is loading. Please wait.

Enhanced Entity-Relationship Model (EER) 1. Enhanced-ER (EER) Model Concepts Includes all modeling concepts of basic ER Additional concepts: subclasses/superclasses,

Similar presentations

Presentation on theme: "Enhanced Entity-Relationship Model (EER) 1. Enhanced-ER (EER) Model Concepts Includes all modeling concepts of basic ER Additional concepts: subclasses/superclasses,"— Presentation transcript:

1 Enhanced Entity-Relationship Model (EER) 1

2 Enhanced-ER (EER) Model Concepts Includes all modeling concepts of basic ER Additional concepts: subclasses/superclasses, specialization/generalization, categories, attribute inheritance The resulting model is called the enhanced-ER or Extended ER (E2R or EER) model It is used to model applications more completely and accurately if needed It includes some object-oriented concepts, such as inheritance 2

3 Enhanced Entity-Relationship Model (EER) 3 EER is an ER model supported with additional semantic concepts. Semantic concepts supported: - Specialization - Generalization - Aggregation

4 Specialization 4 Top-down design process; we designate sub-groupings within an entity type that are distinctive from other entities in the set. These sub-groupings (subclasses) become lower-level entity types that have attributes or participate in relationships that do not apply to the higher-level entity set (superclass).

5 Specialization/Generalization 5 STAFF MANAGERSECRETARY SALES PERSONNEL Subclass Superclass IS_A relationship 1:1

6 Generalization 6 A bottom-up design process – combine a number of entity types that share the same features into a higher-level (superclass) entity type. Specialization and generalization are simple inversions of each other; they are represented in an EER diagram in the same way.

7 Inheritance 7 A subclass entity type inherits all the attributes and relationship participation of the superclass entity type to which it is linked.

8 Inheritance 8 STAFF SALES PERSONNEL Unshared attributes Superclass addressDOBname Sales area Car allowance shared attributes Subclass require CAR Unshared relationship contract COMPANY Shared relationship

9 Subclasses and Superclasses (1) 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,… Each of these groupings is a subset of EMPLOYEE entities Each is called a subclass of EMPLOYEE EMPLOYEE is the superclass for each of these subclasses These are called superclass/subclass relationships. Example: EMPLOYEE/SECRETARY, EMPLOYEE/TECHNICIAN 9

10 Subclasses and Superclasses (2) These are also called IS-A relationships (SECRETARY IS-A EMPLOYEE, TECHNICIAN IS-A EMPLOYEE, …). Note: An entity that is member of a subclass represents the same realworld entity as some member of the superclass – The Subclass member is the same entity in a distinct specific role – An entity cannot exist in the database merely by being a member of a subclass; it must also be a member of the superclass – A member of the superclass can be optionally included as a member of any number of its subclasses Example: A salaried employee who is also an engineer belongs to the two subclasses ENGINEER and SALARIED_EMPLOYEE – It is not necessary that every entity in a superclass be a member of some subclass 10

11 Constraints on Specialization/Generalization 11 Participation constraint determines whether every member in the superclass must participate as a member of a subclass. Two types of participation constraints: - Mandatory (total) - Optional (partial)

12 Attribute Inheritance in Superclass / Subclass Relationships An entity that is member of a subclass inherits all attributes of the entity as a member of the superclass It also inherits all relationships 12

13 Participation Constraints 13 Mandatory (total) participation where every member in the superclass must also be a member of a subclass. STAFF FULL-TIME STAFF PART-TIME STAFF salary Hourly-rate

14 Participation Constraints 14 Optional (partial) participation where a member in the superclass need not belong to any of its subclasses. STAFF MANAGERSECRETARY SALES PERSONNEL

15 Constraints on Specialization/Generalization 15 Disjoint constraint describes the relationship between members of the subclasses & indicates whether it is possible for a member of a subclass to be a member of one or more subclasses. Two types of disjoint constraints: - Disjoint - Non-Disjoint

16 Disjoint Constraints 16 Disjoint constraint when an entity can be a member of only one of the subclasses of the specialization. STAFF FULL-TIME STAFF PART-TIME STAFF salary Hourly-rate d

17 Disjoint Constraints 17 Non-disjoint constraints: a subclass is a member of more than one subclass of specialization. Entity types may overlap. STAFF MANAGERSECRETARY SALES PERSONNEL o

18 Specialization Again Is the process of defining a set of subclasses of a superclass The set of subclasses is based upon some distinguishing characteristics of the entities in the superclass Example: {SECRETARY, ENGINEER, TECHNICIAN} is a specialization of EMPLOYEE based upon job type. – May have several specializations of the same superclass Example: Another specialization of EMPLOYEE based in method of pay is {SALARIED_EMPLOYEE, HOURLY_EMPLOYEE}. – Superclass/subclass relationships and specialization can be diagrammatically represented in EER diagrams – Attributes of a subclass are called specific attributes. For example,TypingSpeed of SECRETARY – The subclass can participate in specific relationship types. For example, BELONGS_TO of HOURLY_EMPLOYEE 18

19 19

20 Generalization Again 20 The reverse of the specialization process 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. – We can view {CAR, TRUCK} as a specialization of VEHICLE – Alternatively, we can view VEHICLE as a generalization of CAR and TRUCK

21 21

22 Aggregation 22 Represents a “part-of” relationship between entity types, where one represents the ‘whole’ and the other the ‘part’. No inherited attributes; each entity has its own unique set of attributes.

23 Aggregation 23 TEAM MEMBER


25 Summary of ERD notations (2) 25 CARDINALITY RATION PARTICIPATION CONSTRAINTS 1 M (min,max)

26 Summary of EERD notations (3) 26 Disjoint constraint d o Non-Disjoint constraint Total Participation Optional Participation

Download ppt "Enhanced Entity-Relationship Model (EER) 1. Enhanced-ER (EER) Model Concepts Includes all modeling concepts of basic ER Additional concepts: subclasses/superclasses,"

Similar presentations

Ads by Google