Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan 200692.3902 R McFadyen1 Class/subclass relationships Inheritance Specialization Generalization.

Slides:



Advertisements
Similar presentations
Enhanced/Extended Relationship-Diagram
Advertisements

© 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.
CHAPTER 3: THE ENHANCED E-R MODEL © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey A. Hoffer,
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1.
Chapter 4 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Use of supertype/subtype relationships Use of supertype/subtype.
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.
1 Enhanced Entity Relationship Modelling EER Model Concepts Includes all basic ER modeling concepts Additional concepts: subclasses/superclasses specialization/generalization.
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.
Specialization and generalization
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
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.
1 The Enhanced Entity Relationship Diagrams (E-ERDs)
EER Model.
Enhanced Entity-Relationship and Object Modeling Chapter 4
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.
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.
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.
Enhanced Entity-Relationship (EER) Model
The 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
EER Model – Chapter
Session 2 Welcome: The sixth learning sequence
Enhanced Entity-Relationship (EER) Modeling
© Shamkant B. Navathe CC.
© Shamkant B. Navathe CC.
EER to Relational Mapping
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:

Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan R McFadyen1 Class/subclass relationships Inheritance Specialization Generalization Constraints: subclass definition, disjointness, completeness constraints Category

Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan R McFadyen2 Class/subclass relationships A subclass is a subgrouping of an entity set: If A is a class and B is a subclass of A, then each instance of B is an instance of A, has the attributes of A (and possibly others defined for B), and participates in A’s relationships (and possibly others defined for B). We illustrate as: A B B is shown as a subclass of A B is a specialization of A A is a generalization of B

Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan R McFadyen3 Class/subclass relationships Suppose Employee is subclassed in many ways according to the value of the attribute jobType : Secretary, Engineer, Technician – we have a predicate-defined subclass We illustrate as: Employee SecretaryTechnicianEngineer The subclass is determined by the value of the jobType attribute; jobType is a discriminator jobType “technician” “engineer” “secretary”

Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan R McFadyen4 Class/subclass relationships Suppose an Employee can be at most one of Technician, Secretary, Engineer We illustrate as: Employee SecretaryTechnicianEngineer subclasses are disjoint jobType “technician”“secretary” “engineer” d

Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan R McFadyen5 Class/subclass relationships Suppose an Employee can be more than one of Technician, Secretary, Engineer – at the same point in time We illustrate as: Employee SecretaryTechnicianEngineer subclasses are overlapping jobType “technician”“secretary” “engineer” o

Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan R McFadyen6 Class/subclass relationships Suppose Employee is subclassed but the decision is left to the database user – we have a user-defined subclass constraint. We illustrate as: Employee d SecretaryTechnicianEngineer No rule is shown for determining the subclass

Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan R McFadyen7 Class/subclass relationships Suppose a business rule states that an Employee must be one of : Secretary, Engineer, Technician We illustrate as: d SecretaryTechnicianEngineer The double line indicates an employee must participate in the specialization. We say the subclassing is complete or total Employee

Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan R McFadyen8 d SecretaryTechnicianEngineer Employee ssn birthDate tGrade tSpeed engType Dept Union Every employee is assigned to a department Only secretaries belong to a union Every employee has a SSN and a birthDate; technicians also have a tGrade attribute, …

Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan R McFadyen9 Specialization hierarchy Every subclass participates in one specialization Specialization lattice Some subclass(es) participate in more than one specialization In OO modeling this situation is referred to as multiple inheritance When multiple levels occur in a specialization graph, a subclass inherits all attributes and relationships of all its ancestors. In a graph, the nodes at the lowest level are called leaf nodes. See figures: 4.1, 4.6, 4.7

Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan R McFadyen10 Category A single subclass is considered to be a subset of the union of several superclasses. personcompany owner u The “u” represents the union of the three distinct and separate entity sets: person, bank, and company Owner is a subset of the union of the three sets. bank Top half of figure 4.8

Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan R McFadyen11 personcompany owner u bank figure 4.8 car truck registered vehicle owns u

Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan R McFadyen12 Category If every building and every lot must be an property, then buildinglot property u The double line indicates that every building and every lot must participate in the category Figure 4.9(b)

Enhanced Entity-Relationship and Object Modeling (Ch 4) Jan R McFadyen13 Specialization If every property must be a building or a lot, then buildinglot property u On the previous slide, participation is total … one could consider using specialization in this case Figure 4.9(b)