--The Entity Relationship Model(4)--1 Outline  ER model  Overview  Entity types Attributes, keys  Relationship types  Weak entity types  uses Integration.

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

--The Entity Relationship Model(3)--1 Outline  ER model  Overview  Entity types Attributes, keys  Relationship types  Weak entity types  Uses Crows.
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.
--The Entity Relationship Model(1)--1 The Entity Relationship Model.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Chapter 4 Enhanced Entity-Relationship (EER) Modeling.
--The Entity Relationship Model(2)--1 Reflexive Rela1tionships  An entity may be related to another entity of the same type.  Example: A Customer could.
Methodology Logical Database Design for the Relational Model
Mapping the ER Model to Relations(1)1 Overview  Mapping entity types  Mapping relationship types  One-to-one  One-to-many  Many-to-many.
Introduction to Database Review 2. Crows-Feet Notation for ER Diagrams  This is an alternative to the diamond representation of relationships.  Diamond.
1 Enhanced Entity Relationship Modelling EER Model Concepts Includes all basic ER modeling concepts Additional concepts: subclasses/superclasses specialization/generalization.
The Enhanced Entity- Relationship (EER) Model
Chapter 2: Entity-Relationship Model (Continued)
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 Modeling © 2002 by Dietrich and Urban1 ADVANCED DATABASE CONCEPTS Enhanced Entity Relationship Modeling Susan D. Urban and.
Enhanced Entity-Relationship and UML Modeling. Enhanced-ER (EER) Model Concepts Includes all modeling concepts of basic ER Additional concepts: subclasses/superclasses,
Entities and Attributes
Database System Concepts, 5th Ed. Chapter 6: Entity-Relationship Model.
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
© Shamkant B. Navathe CC. © Shamkant B. Navathe CC Chapter 4 - Part I Enhanced Entity-Relationship and UML Modeling Copyright © 2004 Ramez Elmasri and.
THE ENHANCED ER (EER) MODEL CHAPTER 8 (6/E) CHAPTER 4 (5/E)
EXAMPLE. Subclasses and Superclasses Entity type may have sub-grouping that need to be represented explicitly. –Example: Employee may grouped into.
Database Systems: Enhanced Entity-Relationship Modeling Dr. Taysir Hassan Abdel Hamid.
EER Model.
Entity Relationship Diagram (2)
1 Chapter 17 Methodology - Local Logical Database Design.
UNIT_2 1 DATABASE MANAGEMENT SYSTEM[DBMS] [Unit: 2] Prepared By Lavlesh Pandit SPCE MCA, Visnagar.
Enhanced Entity-Relationship (EER) Modeling. Slide 4- 2 Chapter Outline EER stands for Enhanced ER or Extended ER EER Model Concepts Includes all modeling.
ICOM 5016 – Introduction to Database Systems Lecture 5 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
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)
Database and Information Retrieval System
Exam 1 Review Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
Lecture 03 Entity-Relationship Diagram. Chapter Outline.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1.
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.
CST203-2 Database Management Systems Lecture 4. Student entity NIDFNameLNameRegNoExamIdBirthdate.
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.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
Lecture 26 Enterprise Systems Development ( CSC447 ) COMSATS Islamabad Muhammad Usman, Assistant Professor.
Methodology - Logical Database Design. 2 Step 2 Build and Validate Local Logical Data Model To build a local logical data model from a local conceptual.
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
The Enhanced Entity- Relationship (EER) Model
Enhanced Entity-Relationship and Object Modeling Objectives
Conceptual Design & ERD Modelling
The Enhanced Entity- Relationship (EER) Model
ENHANCED ENTITY-RELATIONSHIP (EER) MODEL
Enhanced Entity-Relationship (EER) Modeling
Presentation transcript:

--The Entity Relationship Model(4)--1 Outline  ER model  Overview  Entity types Attributes, keys  Relationship types  Weak entity types  uses Integration DEFinition for Information Modeling (IDEF1X) notation in ERwin  EER model  Subclasses  Specialization/Generalization  Schema Design  Single DB  View integration in IS

--The Entity Relationship Model(4)--2 Subclasses And Superclasses  Grouping of the entities of an entity type into subgroups (forming an "IS-A" relationship).  Entities in a superclass are grouped into one or more subclasses.  An arbitrary number of levels is permitted in a class hierarchy.  An entity in a subclass exists in the superclass also (recursively).

--The Entity Relationship Model(4)--3 Subclasses/Superclasses Example  The Customer entity type has the subclasses PreferredCustomer and Employee.  All employees are customers. Customer O Employee Preferred Customer

--The Entity Relationship Model(4)--4 Inheritance Among Classes  Entities in a subclass inherit the attributes of the superclass.  A subclass may have its own attributes (termed the specific attributes).  Entities in a subclass may participate in relationships directly (termed specific relationships), and they may participate in relationships via their superclass(es).

5 Inheritance Example  A PreferredCustomer entity inherits the attributes Name, Address, CutomerID and Balance from Customer.  The PreferredCustomer subclass also has the attribute DiscountLevel. Customer O Employee Preferred Customer CustomerID Address Name Balance EmployeeIDDiscount Level

--The Entity Relationship Model(4)--6 Abstraction  Specialization and generalization are reverse processes of abstraction.  Specialization - process of defining a set of subclasses of an entity type.  Generalization - process of forming a single superclass for a set of entity types.  When to abstract  Attribute(s) relevant only to a subclass  Relationship type(s) relevant only to a subclass

--The Entity Relationship Model(4)--7 Specialization The specialization process allows us to do following  Define a set of subclasses of an entity type.  Establish additional specific attributes with each subclass.  Establish additional specific relationship types between each subclass and other entity type or other subclasses.

--The Entity Relationship Model(4)--8 Abstraction Example - Subclass Rel. Type  Entities in the subclass Employee participate in the Supervises relationship.  PreferredCustomer entities do not participate in this relationship. Customer O Employee Preferred Customer Super- vises Supervisee (1,1) Manager (0,5)

--The Entity Relationship Model(4)--9 A Example of Specialization

--The Entity Relationship Model(4)--10 A Example of Specialization

--The Entity Relationship Model(4)--11 Generalization A REVERSE PROCESS abstraction  Suppress the differences among several entity types, identify their common features.  Generalize them into a single superclass of which the original entity types are special subclasses.

--The Entity Relationship Model(4)--12 An Example of Generalization

--The Entity Relationship Model(4)--13 An Example of Generalization

--The Entity Relationship Model(4)--14 Constraints on Spec. and Gen.  When subclass membership is user-defined, class membership is determined individually for each entity.  Subclass membership can be defined by a predicate (termed predicate-defined or condition-defined). Class membership is predefined.  Attribute-defined specialization

--The Entity Relationship Model(4)--15 Constraints Example  The Film class (with a Kind attribute) can be specialized into a Music Video (Kind = “M”), Educational Film (Kind = “E”) or Foreign film (Kind = “F”). Film d Foreign Film Educational Film Music Video Spoken Language Subtitle Language Recommended Age “F”“M”“E” Kind

16 Subclass Participation  Subclass groupings  disjoint - no entity can be in more than one subclass diamond notation - represent with a (d) crow’s feet notation - represent with an (x)  overlapping - entities may be in several subclasses diamond notation - represent with an (o) crow’s feet notation - default representation  Completeness of subclass  total - all entities in the superclass are in some subclass diamond notation - represent with a double line crow’s feet - ??  partial - an entity in a superclass need not be in a subclass diamond and crow’s feet notation - default representation  Example:  The specialization of the Film class into MusicVideo, EducationalFilm, and ForeignFilm subclasses is disjoint and partial.

--The Entity Relationship Model(4)--17 Update for Specialization and Generalization  Deletion cascades to subclasses.  If a Customer entity that is also an employee is deleted from the Customer class, it is also deleted from the Employee class.  Insertions are cascaded automatically to subclasses when entity membership is predicate-defined.  Example: The insertion of an entity with a Kind of “E” into the Film class will result in that entity being inserted into the EducationalFilm  For total specializations, entities are cascaded to at least one subclass.  Other rules may be derived.

--The Entity Relationship Model(4)--18 Outline  ER model  Overview  Entity types Attributes, keys  Relationship types  Weak entity types  uses Integration DEFinition for Information Modeling (IDEF1X) notation in ERwin  EER model  Subclasses  Specialization/Generalization  Schema Design  Single DB  View integration in IS

--The Entity Relationship Model(4)--19 Schema Design Strategies  Top-down strategy  Start out with high-level, abstract concepts and apply step-wise refinements (e.g., specialization) to add "detail."  Bottom-up strategy  Start out with basic concepts and apply refinements (e.g., generalization).  Inside-out strategy  Start with a few central concepts and successively include additional concepts.  Mixed strategy  Combine the above strategies.

--The Entity Relationship Model(4)--20 Top-down Strategy Customer Checked Out VideoTape Title RentalPrice (0,m) Length CustomerID Name (0,n) Customer Checked Out VideoTape Film Copies TapeNum Title RentalPrice (0,m) (0,n) (1,1) (0,n) FilmID Status Length CustomerID Name

--The Entity Relationship Model(4)--21 Bottom-up Strategy  Example: discovering a new generalized entity type and relating it. Customer Cust Checked Out VideoTape Title RentalPrice (0,m) Length CustomerID Name Emp Checked Out Employee Name EmployeeID Length (0,m) (0,n)

--The Entity Relationship Model(4)--22 Bottom-up Strategy, cont.  This is converted to: Customer Checked Out VideoTape Title RentalPrice (0,m) Length CustomerID Name (0,n) EmployeeID O Employee Preferred Customer

--The Entity Relationship Model(4)--23 Conceptual Database Design Approaches  Centralized design approach  Integrate first the requirements for all applications and then design a single schema.  Assumes a centralized organization.  The DBA merges the multiple sets of requirements.  The DBA designs the schema.  View integration approach  Design first a schema for each application in isolation, then integrate the schemas into a single global schema.  Each user group can design its own schema.  The DBA designs the global schema.

--The Entity Relationship Model(5)-- View Integration Example  View 1  View 2 MoviePerformer Stars In Role Stage Name Date Director (0,n)(0,m) Spoken Language Subtitle Language Name Film Foreign Film Educational Film Music Video Recommended Age O TitleFilmID RentalPriceDistributor Kind “F”“M”“E” Kind

--The Entity Relationship Model(4)--25 View Integration Example, cont.  View 1 is modified to better fit View 2 as shown below. FilmPerformer Stars In Role Stage Name Date Director (0,n)(0,m) Title FilmID Foreign Film d Spoken Language Subtitle Language

View Integration Example, cont.  The two views are then integrated as shown below. FilmPerformer Stars In Role Stage Name Date Director (0,n) (0,m) Title FilmID Spoken LanguageSubtitle Language Foreign Film Educational Film Music Video Recommended Age O RentalPriceDistributor “F”“M”“E” Kind

--The Entity Relationship Model(4)--27 View Integration Methodology  Identify correspondences and conflicts among views.  Naming conflicts (synonyms, homonyms).  Type conflicts (e.g., entity vs. attribute vs. relationship).  Domain conflicts (e.g., integer vs. string).  Constraint conflicts.  Homogenize views.  Resolve (some) conflicts.  Merge views.  Create the global schema.  Restructure the global schema.  Remove redundancy and unnecessary complexity.  Different integration orders are possible using binary and n-ary integration.