EXTENDED-ER (EER) MODEL CONCEPTS. Enhanced-ER (EER) Model Concepts  Basic ER diagram + more concepts =EER model  Additional concepts:  Subclasses/superclasses.

Slides:



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

Session 2 Welcome: The sixth learning sequence
Enhanced/Extended Relationship-Diagram
© 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.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1.
Enhanced Entity-Relationship and UML Modeling
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 4 Enhanced Entity-Relationship (EER) Modeling.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 4- 1.
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.
Enhanced ER modeling techniques Transparencies
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.
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.
MODELING OF UNION TYPES USING CATEGORIES
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.
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.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 2 Modeling using the Concepts of Data Model.
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.
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.
Enhanced Entity-Relationship (EER) Model
Enhanced Entity-Relationship and Object Modeling Objectives
© Shamkant B. Navathe CC.
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:

EXTENDED-ER (EER) MODEL CONCEPTS

Enhanced-ER (EER) Model Concepts  Basic ER diagram + more concepts =EER model  Additional concepts:  Subclasses/superclasses  Specialization/generalization  Categories  Inheritance  Model applications more completely and accurately  Includes Object-oriented concepts s.a inheritance

Subclasses and Superclasses (1) EMPLOYEE SecretaryEngineerManagerTechnicianSalaried_employeeHourly_employee An entity type may have additional meaningful subgroupings of its entities Superclass Subclasses SECRETARY IS-A EMPLOYEE

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 real-world entity as some member of the superclass  The Subclass member is the same entity in a distinct specific role  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

Attribute Inheritance in Superclass / Subclass Relationships  Member of a subclass inherits all attributes of superclass  It also inherits all relationships

Specialization  Process of defining a set of subclasses of a superclass based upon some distinguishing characteristics of the entities in the superclass  Example:  Job Type - {SECRETARY, ENGINEER, TECHNICIAN}  Payment method- {SALARIED_EMPLOYEE, HOURLY_EMPLOYEE}  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

Generalization  Reverse of the specialization process  Several classes with common features are generalized into a superclass; original classes become its subclasses  We can view {CAR, TRUCK} as a specialization of VEHICLE  Alternatively, we can view VEHICLE as a generalization of CAR and TRUCK Vehicle TruckCar TruckCar Vehicle Arrow pointing to the generalized superclass represents a generalization Arrows pointing to the specialized subclasses represent a specialization Note:It is subjective as to which process is more appropriate for a particular situation

GENERALIZATION AND SPECIALIZATION sid student name is A graduate Undergrad Specialization Generalization

Constraints on Specialization and Generalization (1) – Membership Constraints  Predicate defined constraint-Determine exactly those entities that will become members of each subclass by a condition.  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

Membership Constraints  Attribute defined-specialization -If all subclasses in a specialization have membership condition on same attribute of the superclass.  Attribute is called the defining attribute of the specialization  Example: JobType is the defining attribute of the specialization {SECRETARY, TECHNICIAN, ENGINEER} of EMPLOYEE

Membership Constraints  User-defined- If no condition determines membership, the subclass is called user-defined  Membership in a subclass is determined at the time of insertion

Constraints on Specialization and Generalization (2)- Disjointness Constraints  Disjointness Constraint: Disjoint (d)The subclasses must have disjoint sets of entities Overlap (o)The subclasses may have overlapping sets of entities

Completeness Constraint:  Partial- An entity may not belong to any of the subclasses (single-line)

Completeness Constraint:  Total-Every entity in the superclass must be a member of some subclass (double-edge)

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.

“An employee MUST be a member of either a Salaried or a Part-time” sid Employee name Part-time Salaried Specialization Generalization d U U Disjoint Total Specialization

Disjoint partial Specialization Disjoint Partial Specialization

Overlapping Total Specialization sid Emp name Part-time Salaried Specialization Generalization o U U “An employee MUST be a member of a Salaried as well as a Part-time”

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)  In a lattice, a subclass can be a subclass of more than one superclass (called multiple inheritance)

Multiple Specializations

Specialization HierarchyEach subclass belongs to at most one class

Lattice SpecializationsA subclass may belong to more than one class

Specialization / Generalization Lattice Example (UNIVERSITY)

Categories (UNION TYPES)  All of the superclass/subclass relationships we have seen thus far have a single superclass  A shared subclass is subclass in more than one distinct superclass/subclass relationships, where each relationships has a single superclass (multiple inheritance)  In some cases, need to model a single superclass/subclass relationship with more than one superclass  Superclasses represent different entity types  Such a subclass is called a category or UNION TYPE  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  A category member must exist in at least one of its superclasses  Note: The difference from shared subclass, which is subset of the intersection of its superclasses (shared subclass member must exist in all of its superclasses).

Example of categories (UNION TYPES)

Alternative Diagrammatic Notations Symbols for entity type / class, attribute and relationship Displaying attributes Displaying cardinality ratios Various (min, max) notations Notations for displaying specialization / generalization