Chapter 4_part2: The Enhanced Entity-Relationship (EER) Model.

Slides:



Advertisements
Similar presentations
Prof. Sin-Min Lee Department of Computer Science
Advertisements

Session 2 Welcome: The sixth learning sequence
© Shamkant B. Navathe CC. © Shamkant B. Navathe CC Chapter 4 - Part I Enhanced Entity-Relationship and UML Modeling Copyright © 2004 Ramez Elmasri and.
1 Class Number – CS 304 Class Name - DBMS Instructor – Sanjay Madria Instructor – Sanjay Madria Lesson Title – EER Model –21th June.
Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan R McFadyen1 Class/subclass relationships Inheritance Specialization Generalization.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
Enhanced Entity-Relationship and UML Modeling
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 4 Enhanced Entity-Relationship (EER) Modeling.
Enhanced ER-diagram Prof. Sin-Min Lee Department of Computer Science.
1 Enhanced Entity Relationship Modelling EER Model Concepts Includes all basic ER modeling concepts Additional concepts: subclasses/superclasses specialization/generalization.
Chapter 4 The Enhanced Entity-Relationship (EER) Model
© Shamkant B. Navathe CC METU Department of Computer Eng Ceng 302 Introduction to DBMS Enhanced Entity-Relationship (EER) Model by Pinar Senkul resources:
Chapter 41 Enhanced Entity-Relationship and Object Modeling.
EXTENDED-ER (EER) MODEL CONCEPTS. Enhanced-ER (EER) Model Concepts  Basic ER diagram + more concepts =EER model  Additional concepts:  Subclasses/superclasses.
Specialization and generalization
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1 EER stands for Enhanced ER or Extended ER EER Model Concepts Includes all modeling concepts.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
Enhanced Entity-Relationship and UML Modeling. Enhanced-ER (EER) Model Concepts Includes all modeling concepts of basic ER Additional concepts: subclasses/superclasses,
Enhanced Entity-Relationship Model (EER) 1. Enhanced-ER (EER) Model Concepts Includes all modeling concepts of basic ER Additional concepts: subclasses/superclasses,
Entities and Attributes
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entry-Relationship (EER) Model.
Chapter 4: The Enhanced ER Model and Business Rules
1 CSE 480: Database Systems Lecture 4: Enhanced Entity-Relationship Modeling Reference: Read Chapter 8.1 – 8.5 of the textbook.
© Shamkant B. Navathe CC. © Shamkant B. Navathe CC Chapter 4 - Part I Enhanced Entity-Relationship and UML Modeling Copyright © 2004 Ramez Elmasri and.
Enhanced Entity – Relationship (EER) and Object Modeling (Based on Chapter 4 in Fundamentals of Database Systems by Elmasri and Navathe, Ed. 4)
THE ENHANCED ER (EER) MODEL CHAPTER 8 (6/E) CHAPTER 4 (5/E)
Database Systems: Enhanced Entity-Relationship Modeling Dr. Taysir Hassan Abdel Hamid.
EER Model.
Enhanced Entity-Relationship (EER) Modeling. Slide 4- 2 Chapter Outline EER stands for Enhanced ER or Extended ER EER Model Concepts Includes all modeling.
Keys for Relationship Sets The combination of primary keys of the participating entity sets forms a super key of a relationship set. – (customer-id, account-number)
1 CSBP430 – Database Systems Chapter 4: Enhanced Entity– Relationship and Object Modeling Elarbi Badidi College of Information Technology United Arab Emirates.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1.
Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Copyright © 2004 Ramez Elmasri and Shamkant Navathe Enhanced-ER (EER) Model Concepts.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 4 Enhanced Entity-Relationship (EER) Modeling.
Exam 1 Review Dr. Bernard Chen Ph.D. University of Central Arkansas.
Slide 4-1 Elmasri and Navathe, Fundamentals of Database Systems, Fourth Edition Revised by IB & SAM, Fasilkom UI, 2005 Exercise 1. a property or description.
© Shamkant B. Navathe CC Enhanced Entity-Relationship Copyright © 2004 Ramez Elmasri and Shamkant Navathe.
Topic 4 - Part I Enhanced Entity-Relationship and UML Modeling
Copyright © 2016 Ramez Elmasri and Shamkant B. Navathe CHAPTER 4 Enhanced Entity-Relationship (EER) Modeling Slide 1- 1.
Extended ER Modelling. Extended E-R Features: Specialization Top-down design process; we designate subgroupings within an entity set that are distinctive.
Lecture 3 A short revision of ER and EER modelling See R. Elmasri, S.B. Navathe. Fundamentals of Database Systems (third edition) Addison-wesley. Chapter.
Enhanced Entity-Relationship and UML Modeling. 2.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 4- 1.
Database Systems 主講人 : 陳建源 日期 :99/10/19 研究室 : 法 Chapter 4 Enhanced Entity-Relationship and Object Modeling.
Databases (CS507) CHAPTER 7.
Enhanced Entity-Relationship (EER) Model
The Enhanced Entity- Relationship (EER) Model
Enhanced Entity-Relationship and Object Modeling Objectives
© Shamkant B. Navathe CC.
Conceptual Design & ERD Modelling
Enhanced Entity-Relationship (EER) Modeling
The Enhanced Entity- Relationship (EER) Model
Enhanced Entity-Relationship (EER) Modeling
Session 2 Welcome: The sixth learning sequence
Enhanced Entity-Relationship (EER) Modeling
© Shamkant B. Navathe CC.
© Shamkant B. Navathe CC.
CS4222 Principles of Database System
CS4222 Principles of Database System
Sampath Jayarathna Cal Poly Pomona
ENHANCED ENTITY-RELATIONSHIP (EER) MODEL
Sampath Jayarathna Cal Poly Pomona
© Shamkant B. Navathe CC.
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship (EER) Modeling
Presentation transcript:

Chapter 4_part2: The Enhanced Entity-Relationship (EER) Model

Introduction to Databases 2 Outline Enhanced-ER (EER) Model Concepts Subclasses and Superclasses  Inheritance  Specialization  Generalization Constraints on Specialization/Generalization Specialization and Generalization Hierarchies and Lattices Modeling of UNION Types Using Categories Specialization and Generalization In UML

Introduction to Databases 3 Generalization 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

Introduction to Databases 4 Generalization (a) Two entity types, CAR and TRUCK. (b) Generalizing CAR and TRUCK into the superclass VEHICLE.

Introduction to Databases 5 Generalization and Specialization Diagrammatic notation sometimes used to distinguish between generalization and specialization  Arrow pointing to the generalized superclass represents a generalization  Arrows pointing to the specialized subclasses represent a specialization  We do not use this notation because it is often subjective as to which process is more appropriate for a particular situation  We advocate not drawing any arrows in these situations Data Modeling with Specialization and Generalization  A superclass or subclass represents a set of entities  Shown in rectangles in EER diagrams (as are entity types)  Sometimes, all entity sets are simply called classes, whether they are entity types, superclasses, or subclasses

Introduction to Databases 6 Inheritance STAFF SALES PERSONNEL Unshared Attributes Superclass Address DobName Sales Area Car Allowance Shared Attributes Subclass REQUIRE CAR Unshared Relationship CONTRACT COMPANY Shared Relationship

Introduction to Databases 7 Constraints on Specialization and Generalization (1) If we can determine exactly those entities that will become members of each subclass by a condition, the subclasses are called predicate- defined (or condition-defined) subclasses  Condition is a constraint that determines subclass members  Display a predicate-defined subclass by writing the predicate condition next to the line attaching the subclass to its superclass If all subclasses in a specialization have membership condition on same attribute of the superclass, specialization is called an attribute defined- specialization and the attribute is called the defining attribute of the specialization Example: JobType is the defining attribute of the specialization {SECRETARY, TECHNICIAN, ENGINEER} of EMPLOYEE

Introduction to Databases 8 If no condition determines membership, the subclass is called user-defined  Membership in a subclass is determined by the database users by applying an operation to add an entity to the subclass  Membership in the subclass is specified individually for each entity in the superclass by the user Constraints on Specialization and Generalization (1)

Introduction to Databases 9 EER diagram notation for an attribute-defined specialization on Job_type Job_type ‘Secretary’ ‘Technician’ ‘Engineer’

Introduction to Databases 10 Disjointness Constraint:  Specifies that the subclasses of the specialization must be disjointed (an entity can be a member of at most one of the subclasses of the specialization). Specified by d (inside the circle) in EER diagram  If not disjointed, overlap; that is the same entity may be a member of more than one subclass of the specialization. Specified by o (inside the circle) in EER diagram Completeness Constraint:  Total specifies that every entity in the superclass must be a member of some subclass in the specialization/ generalization. Shown in EER diagrams by a double line  Partial allows an entity not to belong to any of the subclasses. Shown in EER diagrams by a single line Constraints on Specialization and Generalization (1)

Introduction to Databases 11 Constraints on Specialization and Generalization (3) Hence, we have four types of specialization/generalization:  Disjoint, total  Disjoint, partial  Overlapping, total  Overlapping, partial Note: Generalization usually is total because the superclass is derived from the subclasses.

Introduction to Databases 12 Example of disjoint partial Specialization

Introduction to Databases 13 Example of overlapping total Specialization

Introduction to Databases 14 Specialization / Generalization Hierarchies, Lattices and Shared Subclasses A subclass may itself have further subclasses specified on it Forms a hierarchy or a lattice Hierarchy has a constraint that every subclass has only one superclass (called single inheritance) ; this is basically a tree structure In a lattice, a subclass can be subclass of more than one superclass (called multiple inheritance) In a lattice or hierarchy, a subclass inherits attributes not only of its direct superclass, but also of all its predecessor superclasses A subclass with more than one superclass is called a shared subclass Can have specialization hierarchies or lattices, or generalization hierarchies or lattices

Introduction to Databases 15 A specialization lattice with shared subclass ENGINEERING_MANAGER

Introduction to Databases 16 In specialization, start with an entity type and then define subclasses of the entity type by successive specialization (top down conceptual refinement process) In generalization, start with many entity types and generalize those that have common properties (bottom up conceptual synthesis process) In practice, the combination of two processes is employed Utilizing Specialization and Generalization in Refining Conceptual Schemas