LELCTURE 4: ENHANCED ENTITY-RELATIONSHIP MODELING (EER) Ref. Chapter12 from Database Systems: A Practical Approach to Design, Implementation and Management. Thomas Connolly, Carolyn Begg. IS220 : D at ab ase Fundamentals
Chapter Objectives 2 In this chapter you will learn: The limitations of the basic concepts of the Entity Relationship (ER) model and the requirements to represent more complex applications using additional data modeling concepts. The most useful additional data modeling concepts of the Enhanced Entity Relationship (EER) model called specialization/generalization and inheritance.
Main Terms 3 Enhanced ER model. Specialization Generalization Inheritance. Participation constraints. Disjoint constraints.
4 Enhanced Entity-Relationship (EER) Model Enhanced Entity-Relationship (EER) Model is an ER model supported with additional semantic concepts. Semantic concepts supported: Specialization Generalization
Specialization 5 Specialization: Top-down design process; we designate sub-groupings within an entity type that are distinctive from other entities in the set.
Generalization 6 Generalization: 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.
Specialization/ Generalization 7 The 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).
Superclass/Subclass Relationship 8 Superclass IS_A relationship 1:1 Subclass MANAGER STAFF SECRETARY SALES PERSONNEL
Inheritance 9 A subclass entity type inherits all the attributes and relationship participation of the superclass entity type to which it is linked. An entity in a subclass represents the same real world object as in the superclass, and may possess subclass-specific attributes, and sometimes relationships, as well as those associated with the superclass.
Inheritance (cont.) 10 shared attributes name dob address Shared relationship Superclass STAFF contract COMPANY SALES Subclass require CAR PERSONNEL Unshared attributes car allowance sales area Unshared relationship
11 Constraints on Specialization/Generalization There are two constraints that may apply to a specialization/ generalization: Participation constraint Disjoint constraints.
Participation Constraints 12 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)
Participation Constraints (cont.) 13 Mandatory (total) participation where every member in the superclass must also be a member of a subclass. STAFF salary FULL-TIME STAFF PART-TIME STAFF Hourly-rate
Participation Constraints (cont.) 14 Optional (partial) participation where a member in the superclass need not belong to any of its subclasses. STAFF MANAGER SECRETARY SALES PERSONNEL
Disjoint Constraints 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 than one, subclasses. Two types of disjoint constraints: Disjoint Non-Disjoint
Disjoint Constraints (cont.) 16 Disjoint constraint (d): when an entity can be a member of only one of the subclasses of the specialization. STAFF d salary FULL-TIME STAFF PART-TIME STAFF Hourly-rate
Disjoint Constraints (cont.) 17 Non-disjoint constraints (o): an entity is a member of more than one subclass of specialization. Entity types may overlap. STAFF o MANAGER SECRETARY SALES PERSONNEL
Summary of ER notations 18 ENTITY ATTRIBUTE WEAK ENTITY RELATIONSHIP IDENTIFYING RELATIONSHIP KEY ATTRIBUTE MULTI-VALUED COMPOSITE DERIVED
Summary of ER notations (cont.) 19 1 M CARDINALITY CONSTRAINTS (min,max) PARTICIPATION CONSTRAINTS
Summary of EER notations 20 d o Disjoint constraint Non-Disjoint constraint Total Participation Optional Participation