Chapter 4: Enhanced Entity-Relationship (EER) Modeling

Slides:



Advertisements
Similar presentations
© Shamkant B. Navathe CC. © Shamkant B. Navathe CC Chapter 4 - Part I Enhanced Entity-Relationship and UML Modeling Copyright © 2004 Ramez Elmasri and.
Advertisements

CS 157A: Intro to Database Sys Summary of Chapter Section 4.1 of the textbook Data Modeling and Database Design Copyright 2007 Thomson Course Technology.
1 Class Number – CS 304 Class Name - DBMS Instructor – Sanjay Madria Instructor – Sanjay Madria Lesson Title – EER Model –21th June.
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.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Conceptual Data Modeling Using Entities and Relationships.
Enhanced Entity-Relationship and UML Modeling
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 4 Enhanced Entity-Relationship (EER) Modeling.
1 Enhanced Entity Relationship Modelling EER Model Concepts Includes all basic ER modeling concepts Additional concepts: subclasses/superclasses specialization/generalization.
Enhanced ER modeling techniques Transparencies
Entity-Relationship (E-R) Model
December 4, 2002 Data Modeling – James Cohen Enhanced Entity Relationship (EER) Model Presented by James Cohen.
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.
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
Databases Illuminated Chapter 8 The Enhanced Entity-Relationship Model and the Object-Relational 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.
Enhanced Entity-Relationship (EER) Modeling. Slide 4- 2 Chapter Outline EER stands for Enhanced ER or Extended ER EER Model Concepts Includes all modeling.
Enhanced Entity-Relationship Modeling
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.
IS6145 Database Analysis and Design Lecture 5: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
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 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 3: THE ENHANCED.
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.
Chapter 4_part2: The Enhanced Entity-Relationship (EER) Model.
Database Systems 主講人 : 陳建源 日期 :99/10/19 研究室 : 法 Chapter 4 Enhanced Entity-Relationship and Object Modeling.
Databases (CS507) CHAPTER 7.
IS6125 Database Analysis and Design Lecture 7: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
Enhanced Entity-Relationship (EER) Model
The Enhanced Entity- Relationship (EER) Model
© Shamkant B. Navathe CC.
Relational Database Design by ER- and EER-to- Relational Mapping
The Enhanced Entity- Relationship (EER) Model
Enhanced Entity-Relationship (EER) Modeling
EER Model – Chapter
Session 2 Welcome: The sixth learning sequence
Enhanced Entity-Relationship (EER) Modeling
IS6145 Database Analysis and Design Lecture 5: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
Enhanced ER Modeling Transparencies
© Shamkant B. Navathe CC.
IS6145 Database Analysis and Design Lecture 5: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
© Shamkant B. Navathe CC.
IS6125 Database Analysis and Design Lecture 7: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
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: Enhanced Entity-Relationship (EER) Modeling Data Modeling and Database Design Chapter 4: Enhanced Entity-Relationship (EER) Modeling

Remember! Presentation Layer ER Diagram  Contains hashes and oval Design-specific ER Diagram (Coarse-granularity)  Uses (min, max) notation  Maps deletion rules Design-specific ER Diagram (Fine-granularity)  Maps attribute characteristics into ER diagram  Decomposes multi-valued attributes  Decomposes m:n relationships Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Enhanced Entity-Relationship (EER) Model Enhanced Entity-Relationship (EER) modeling is an extension to the ER modeling that incorporates additional constructs Central construct Superclass/subclass (SC/sc) relationship More specifically: Specialization/generalization Categorization Aggregation Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Superclass/Subclass Relationship (SC/sc) Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

An Instance Diagram Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Think About It… Theoretically, one has three choices of modeling furniture/chair/table/sofa Model three separate entity types for chair, table, and sofa, and create three separate relationship types with the entity type store Model furniture as an entity type with an attribute called furniture_type; then chair, table, and sofa would be values of that attribute Model furniture as a superclass/subclass Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

SC/sc Relationships There are two basic kinds of Sc/sc relationships Specialization/Generalization: One superclass (SC) is related to one or more subclasses (sc) Categorization: One subclass (sc) is related to one or more superclasses (SC) Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Vignette 1 Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Modeling Vignette 1: Alternative 1 Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Modeling Vignette 1: Alternative 2 Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Modeling Vignette 1: Alternative 3 Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Properties of SC/sc Relationships An entity that exists in a subclass can be associated with only one superclass entity An entity cannot exist in the database merely by being a member of a subclass; it must also be a member of an associated superclass An entity that is a member of a superclass can be optionally included as a member of any number of its subclasses It is not required that every member of a superclass be a member of a subclass Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Properties of SC/sc Relationships (continued) Type Inheritance Property: A subclass inherits all the attributes of the superclass to which it is related In addition, it will also inherit all the relationship types in which the superclass participates A subclass may also have its own specific attributes in addition to the attributes inherited Likewise, a subclass may have its own specific relationship(s) with other entity types (i.e., inter-entity class relationships) Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Note That… The cardinality ratio of any SC/sc relationship is always 1:1 The participation of the subclass in a SC/sc relationship is always total A subclass inherits all attributes as well as all relationship types that a superclass possesses (type inheritance property) Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Specialization and Generalization Specialization is the process of generating subgroups (‘sc’s) of a generic entity class (SC) by specifying the distinguishing properties (attributes) of the subgroups (= top-down approach) Generalization, on the other hand, crystallizes the common properties (attributes) shared by a set of entity types (‘sc’s) into a generic entity type (SC) (= bottom-up approach) Notation: circle + fork (indicating subset) Read: “is-a” Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Specialization and Generalization (continued) Completeness Constraint The participation of the superclass in a specialization/ generalization is referred to as the completeness constraint and can assume one of two values: total or partial Total specialization means that every entity of the superclass must participate in this specialization/ generalization relationship (indicated by a solid line from the superclass to the specialization/generalization symbol (i.e., the circle)) Partial specialization means that there may be entities present in the superclass that do not participate in this specialization/generalization (indicated by a dotted line) Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Specialization and Generalization (continued) Disjointness Constraint Used to specify that the subclasses of a specialization must be: Disjointed (indicated by ‘D’), i.e., an entity of the superclass cannot be a member of more than one subclass Overlapped across subclasses (indicated by ‘O’) Please note that you have to specify both: completeness and disjointness constraints! Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Notation Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

An EER Model of Vignette 1 Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Sample Data Sets For EER Model of Vignette 1 Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

An Extension of Vignette 1: Multiple Specializations Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Sample Data Sets For Vignette 1 Extension Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

An EER Model of Vignette 2 Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Specialization/Generalization Hierarchy Example of a Hierarchy: [STUDENT -> STUDENT_ATHLETE -> FOOTBALL_PLAYER -> {DEFENSIVE_PLAYER, OFFENSIVE_PLAYER}] shows a 3-level hierarchy Inheritance A subclass inherits the attributes and relationship types of not just the immediate parent, but also of the predecessor superclasses in the hierarchy all the way up to the root of the specialization hierarchy Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

An EER Model of Vignette 3 Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Specialization/Generalization Lattice In a specialization lattice, an entity type can participate as a subclass in more than one specialization (i.e., a child can have more than one parent) Inheritance The subclass will inherit all the attributes and relationship types from the superclasses of all the specializations participating in the lattice and the predecessor hierarchy of all these superclasses This is called multiple type inheritance, and the subclass in the lattice is referred to as a shared subclass Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

The Categorization Construct A categorization occurs when a subclass is associated with more than one superclass of different entity types The subclass is called category An entity that is a member of the category (subclass) must exist in ONLY ONE of the superclasses in the categorization relationship Example: A financial donor can be an individual, a company, or a foundation  no “is-a” relationship! Notation: ‘U’ (= union, the subclass is a subset of the union of the superclasses) Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Categorization Example Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Characteristics of a Categorization There is only one subclass in each categorization The cardinality ratio is 1:1 within and across the SC/sc relationship The participation of the subclass in the categorization is always total Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Characteristics of a Categorization (continued) Each superclass may exhibit either total or partial participation A category can either be: A total category (i.e., the category is the union of all the superclass entities) A partial category (i.e., the category is a true subset of the union of all the superclass entities) A category possesses the property of selective type inheritance (i.e., it inherits attributes of one entity type only) Often a unique identifier for a category must be manufactured (which is called a surrogate key) Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Sample Data Sets For Categorization Example Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Choosing the Appropriate EER Construct Exercise: Part1: Consider an automobile dealership in the state of Texas; the dealership typically stocks cars, trucks, vans, and sport utility vehicles (SUVs) Part 2: Not all vehicles in the dealership are registered vehicles though How would we model REGISTERED_VEHICLE? One exception exists in which a categorization and a generalization/specialization are mutually substitutable constructs: in the case of a total category! Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Choosing the Appropriate EER Construct (continued) Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Choosing the Appropriate EER Construct (continued) Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Choosing the Appropriate EER Construct (continued) Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Choosing the Appropriate EER Construct (continued) Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

The Aggregation Construct An aggregation allows us to model a “whole/part” relationship as an “is-a-part-of” relationship between a subclass and a superclass An entity in the aggregate contains superclass entities from ALL SC/sc relationships in which it participates Inheritance: Selective type inheritance connotes the inheritance of attributes and relationships from ALL superclass entities contained in the specific aggregation Notation: ‘A’ Read: “is-part-of” Note that an aggregate can never be partial Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

An Example of Aggregation Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

An Aggregation Hierarchy Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

Aggregation Versus Categorization Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

A Fine-granular Design-Specific EER Diagram for Vignette 3 Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

A Presentation Layer EER Diagram For Bearcat, Inc. Chapter 4 – Enhanced Entity-Relationship (EER) Modeling

A Fine-granular Design-Specific EER Diagram For Bearcat, Inc. Chapter 4 – Enhanced Entity-Relationship (EER) Modeling