Database Systems 主講人 : 陳建源 日期 :99/10/19 研究室 : 法 401 Chapter 4 Enhanced Entity-Relationship and Object Modeling.

Slides:



Advertisements
Similar presentations
Prof. Sin-Min Lee Department of Computer Science
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.
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.
The Enhanced Entity- Relationship (EER) 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.
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.
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.
Enhanced Entity-Relationship and Object Modeling
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.
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.
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
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:

Database Systems 主講人 : 陳建源 日期 :99/10/19 研究室 : 法 Chapter 4 Enhanced Entity-Relationship and Object Modeling

1. EER Model Concepts subclasses/superclasses specialization/generalization categories (UNION types) attribute and relationship inheritance 2. Constraints on Specialization/ Generalization 3. UNION Types Using Categories 4. An Example EER Schema Outline

Extended Entity-Relationship (EER)Model An extension of ER model includes the concepts of subclass and superclass specialization and generalization category attribute and relationship inheritance 1. EER Model Concepts

Subclass and Superclass In many cases an entity type has numerous subgroupings of its entities e.g., EMPLOYEE may be grouped into SECRETARY, ENGINEER, MANAGER, TECHNICIAN Each subgroup form a subclass of the entity type (superclass) e.g., SECRETARY ENGINEER MANAGER TECHNICIAN EMPLOYEE superclass subclass 1. EER Model Concepts

Class/subclass (IS-A/AN) relationship The relationship between a superclass and any one of its subclasses e.g., EMPLOYEE/MANAGER An entity being a member of a subclass must also be a member of the superclass e.g., a SECRETARY entity ‘Joan Logano’ is also the EMPLOYEE ‘Joan Logano’ A subclass entity is the same as that in the superclass, but in a distinct specific role 1. EER Model Concepts

Type inheritance A subclass entity inherits all the attributes of the entity as a member of the superclass all the relationships in which the superclass participates A subclass should have specific attributes and can participate in specific relationship types e.g., SECRETARY has attribute TypingSpeed 1. EER Model Concepts

Specialization The process of defining a set of subclasses of an entity type (superclass) based on some distinguishing characteristic, e.g., {SECRETARY, ENGINEER, TECHNICIAN} based on job type {SALARIED_EMPLOYEE, HOURLY_EMPLOYEE} based on method of pay 1. EER Model Concepts

EER Model Concepts (cont.)

Reasons for using (specialization) subclass Certain attributes may apply to some but not all entities of the superclass Some relationship types may be participated in only by entities that are members of the subclass 1. EER Model Concepts

Generalization The process of identifying the common features among several entity types, and generalizing them into a single superclass e.g., CAR and TRUCK can be generalized into VEHICLE Generalization can be viewed as the inverse of specialization 1. EER Model Concepts

ER Model Concepts (cont.)

Predicate-defined (or condition-defined) subclasses Placing a condition on the value the attribute that identify the subclasses e.g., SECRETARY subclass by the defining predicate JobType = ‘ Secretary ’ A constraint specifying that members of the subclass must satisfy the predicate 2. Constraints and Characteristics of Specialization/ Generalization

2. Constraints on Specialization/ Generalization

Attribute-defined specialization Specify that all subclasses having the membership condition on the same attribute of the superclass The attribute is called the defining attribute of the specialization, e.g., Job type 2. Constraints and Characteristics of Specialization/ Generalization

Disjointness constraint Specify that the subclasses of the specialization must be disjoint, i.e., an entity belongs to at most one subclass e.g., specialization {HOURLY_EMPLOYEE, SALARIED_EMPLOYEE} denoted as symbol If the subclasses are not disjoint, their sets of entities may overlap, denoted as symbol d o 2. Constraints and Characteristics of Specialization/ Generalization

Completeness constraint Total specialization constraint Specify that every entity in the superclass must be a member of some subclass in the specialization Partial specialization Allow an entity not to belong to any of the subclasses 2. Constraints and Characteristics of Specialization/ Generalization

Specialization Hierarchies and Lattices A subclass itself may have further subclasses specified on it, forming a hierarchy or a lattice of specializations For a specialization hierarchy every subclass participates in only one class/subclass For a specialization lattice a subclass can be a subclass in more than one class/subclass 2. Constraints and Characteristics of Specialization/ Generalization

A subclass with more than one superclass is called a shared subclass, leading to multiple inheritance e.g., ENGINEERING_MANAGER Any inherited attribute should be included only once in a shared subclass 2. Constraints and Characteristics of Specialization/ Generalization

Top-down conceptual refinement Start with an entity type and then define subclasses by successive specialization e.g., A university database schema PERSON => {EMPLOYEE, ALUMNUS, STUDENT} {STAFF, FACULTY, STUDENT_ASSISTANT} {RESEARCH_ASSISTANT, TEACHING_ASSISTANT} {GRADUATE_STUDENT,UNDERGRADUATE_STUDENT} 2. Constraints and Characteristics of Specialization/ Generalization

Bottom-up conceptual synthesis Start with entity types and then define superclasses by successive generalization e.g., {STAFF, FACULTY, ALUMNUS} EMPLOYEE Hybrid conceptual process A combination of the two processes 2. Constraints and Characteristics of Specialization/ Generalization

Union type (Category) Modeling a single superclass/subclass relationship with more than one superclass Superclasses can represent different entity types e.g., In a vehicle registration database, the vehicle owner can be a person, a bank, or a company => OWNER: a subclass of the UNION of COMPANY, BANK, and PERSON The union type (category) is specified via  symbol, called set union operation 3. UNION Types Using Categories

A category can be total or partial e.g., Fig 4.9[5th], Fig 7.27[6th], where c1 and c2 are predicate conditions that specify which COMPANY and PERSON entities are members of ACCOUNT_HOLDER The superclasses of a category may have different key attributes e.g., OWNER category of Fig 4.8[5th], Fig 7.26[6th] have the same key attribute e.g., REGISTERED_VEHICLE category 3. UNION Types Using Categories

Category vs shared subclass A category is a subset of the union of its superclasses An entity that is a member of a category must exist in only one of the superclasses e.g., an OWNER may be a COMPANY a BANK, or a PERSON 3. UNION Types Using Categories

A shared subclass is a subset of the intersection of the superclasses An entity that is a member of the shared subclass must exist in all superclasses e.g., An engineering manager must be an ENGINEER, a MANAGER, and a SALARIED_EMPLOYEE 3. UNION Types Using Categories

Category vs generalized superclass A total category can be represented as a specialization (or a generalization) A partial category cannot be represented as a partial specialization (or a generalization) e.g., category REGISTERED_VEHICLE (Fig 4.8[5 th ], Fig 7.26[6 th ]) and generalized superclass VEHICLE (Fig 4.3(b) [5 th ], Fig 7.21(b) [6 th ])) 3. UNION Types Using Categories

A UNIVERSITY Database Example Requirements: The database keeps track Students and their majors, transcripts, and registration The university ’ s course offerings The sponsored research projects of faculty and graduate students The advisor and thesis committee of each graduate student Colleges and their related departments 4. An Example EER Schema

Initial design Entity types STUDENT COURSE FACULTY GRADUATE_STUDENT GRANT (project) 4. An Example EER Schema

DEPARTMENT (student ’ s majors) SECTION (course offerings, student ’ s registration) COLLEGE Superclass/subclass STUDENT/GRAD_STUDENT SECTION/CURRENT_SECTION (for quarter system universities) 4. An Example EER Schema

Generalization PERSON: {FACULTY, STUDENT} Category (Union type) INSTRUCTOR_RESEARCHER: {FACULTY, GRAD_STUDENT} 4. An Example EER Schema

Iterative refinement Relationship types STUDENT CURRENT_SECTION STUDENT DEPARTMENT STUDENT SECTION FACULTY DEPARTMENT FACULTY GRAD_STUDENT FACULTY GRANT 4. An Example EER Schema

INSTRUCTOR_RESEARCHER SECTION GRANT INSTRUCTOR_RESEARCHER COURSE SECTION DEPARTMENT COURSE COLLEGE DEPARTMENT Structure constraints 4. An Example EER Schema

ER Conceptual Design (cont.)

Alternative Notation

Summary Introduced the EER model concepts Class/subclass relationships Specialization and generalization Inheritance These augment the basic ER model concepts introduced in Chapter 3 EER diagrams and alternative notations were presented