1 Chapter 4 Enhanced E-R Model. 2 Supertypes and Subtypes Subtype: A subgrouping of the entities in an entity type which has attributes that are distinct.

Slides:



Advertisements
Similar presentations
THE EXTENDED ENTITY RELATIONSHIP MODEL (EERM)
Advertisements

1 © Prentice Hall, 2002 Chapter 4: The Enhanced E-R Model and Business Rules Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
Chapter 4: The Enhanced ER Model and Business Rules
Enhanced E-R Models and Business Rules
1 Chapter 4 The Enhanced ER Model and Business Rules.
Chapter 3: The Enhanced E-R Model
Basic notation for supertype/subtype relationships
Enhanced Entity-Relationship Modeling. Strong and Weak Entity Types Strong entity: Each object is uniquely identifiable using primary key of that entity.
Chapter 3 The Enhanced E-R Model
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 3: The Enhanced E-R Model Modern Database Management 10 th Edition Jeffrey A. Hoffer,
Chapter 3  Define terms  Understand use of supertype/subtype relationships  Understand use of specialization and generalization techniques  Specify.
1 © Prentice Hall, 2002 Chapter 4: The Enhanced E-R Model and Business Rules Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
Chapter 3 © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 CHAPTER 4: THE ENHANCED E-R MODEL Modern Database Management 11 th Edition Jeffrey.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 6 Advanced Data Modeling.
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,
1 © Prentice Hall, 2002 Chapter 4: The Enhanced E-R Model and Business Rules Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
Chapter 4 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Use of supertype/subtype relationships Use of supertype/subtype.
Chapter 4: The Enhanced ER Model and Business Rules
Enhanced Entity-Relationship Modeling
The Enhanced E-R (EER) Model
IS 4420 Database Fundamentals Chapter 4: The Enhanced ER Model and Business Rules Leon Chen.
Modern Systems Analysis and Design Third Edition
Chapter 4: The Enhanced E-R Model and Business Rules
Chapter 4 1 Chapter 4: The Enhanced ER Model and Business Rules.
Chapter 3: The Enhanced E-R Model
1 Chapter 4: The Enhanced ER Model and Business Rules.
 Keys are special fields that serve two main purposes: ◦ Primary keys are unique identifiers of the relation in question. Examples include employee numbers,
Class Agenda – 04/04/2006 Discuss database modeling issues
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 3: The Enhanced E-R Model Modern Database Management 10 th Edition Jeffrey A. Hoffer,
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 The Enhanced Entity Relationship Diagrams (E-ERDs)
Chapter 4: The Enhanced ER Model and Business Rules
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Chapter 4 1 Chapter 4: The Enhanced ER Model and Business Rules Modern Database Management Jeffrey A. Hoffer, Mary B. Prescott, Fred R. McFadden.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Modeling Data in the Organization Chapters 3 + 4: Modern Database Management 9 th Edition.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
Chapter 3: The Enhanced E-R Model
1 The Enhanced Entity Relationship Diagrams (E-ERDs)
Enhanced Entity-Relationship and Object Modeling Chapter 4
Chapter 3: The Enhanced E-R Model
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,
© 2011 Pearson Education 1 Chapter 3: Advanced Database Analysis Modern Database Management 10 th Edition, International Edition Jeffrey A. Hoffer, V.
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,
Database Systems Supertypes and Subtypes Lecture # 10.
Database Management System Prepared by Dr. Ahmed El-Ragal Reviewed & Presented By Mr. Mahmoud Rafeek Alfarra College Of Science & Technology- Khan younis.
Entity Relationship Modeling
Enhanced Entity-Relationship 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.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 4: The Enhanced E-R Model and Business Rules Modern Database Management 9 th Edition.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 4: The Enhanced E-R Model Modern Database Management 9 th Edition Jeffrey A. Hoffer,
Advance Database Engineering 1 Chapter 4: The Enhanced ER Model and Business Rules Modern Database Management 7 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 3: THE ENHANCED.
© 2005 by Prentice Hall 1 Chapter 4: The Enhanced ER Model and Business Rules Modern Database Management 7 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
1 Database Design Entity-Relationship Modeling N. Ilayaraja PSG Tech.
Chapter 3: The Enhanced E-R Model
The Enhanced E-R Model and Business Rules
LECTURE 4: Chapter 4: The Enhanced E-R Model
Advanced Database Analysis
Chapter 4: The Enhanced E-R Model and Business Rules
Chapter 4: The Enhanced ER Model and Business Rules
Super Entity & Sub Entity
Database Management System 1 (ITED123A)
Chapter 3: The Enhanced E-R Model
Overview of Entity‐Relationship Model
CHAPTER 3: THE ENHANCED E-R MODEL
MBA 664 Database Management
Database Management System
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Entity Relationship (ER) Modeling
CGS 2545: Database Concepts Summer 2006
Presentation transcript:

1 Chapter 4 Enhanced E-R Model

2 Supertypes and Subtypes Subtype: A subgrouping of the entities in an entity type which has attributes that are distinct from those in other subgroupings. Supertype: An entity type whose subtypes share common attributes. Attributes that are shared by all entities (including the identifier) are associated with the supertype. (Fig. 4-1, 2)

3 Basic notation for supertype/subtype relationships

4 Employee supertype with three subtypes

5 Attribute Inheritance Subtype entities inherit values of all attributes of the supertype. An occurrence of a subtype is also an occurrence of the supertype.

6 Use of Supertype/Subtype There are attributes that apply to some (but not all) of the instances of an entity type. The instances of a subtype participate in a relationship unique to that subtype. (see Fig. 4-3.)

7 Supertype/subtype relationships in a hospital

8 Generalization and Specialization Generalization: The process of defining a more general entity type from a set of more specialized entity types. (Fig. 4-4) Specialization: The process of defining one or more subtypes of the supertype, and forming supertype/subtype relationships. (Fig. 4-5)

9 Example of generalization (a) Three entity types: CAR, TRUCK, and MOTORCYCLE

10 (b) Generalization to VEHICLE supertype

11 Example of specialization (a) Entity type PART

12 (b) Specialization to MANUFACTURED PART and PURCHASED PART

13 Constraints in Supertype/ Subtype Relationships Completeness Constraints: Whether an instance of a supertype must also be a member of at least one subtype. –Total Specialization Rule: Yes (Fig. 4-6a - note the double line convention) –Partial Specialization Rule: No (Fig. 4-6b)

14 Examples of completeness constraints (a) Total specialization rule

15 (b) Partial specialization rule

16 Constraints in Supertype/ Subtype Relationships Disjointness Constraints: Whether an instance of a supertype may simultaneously be a member of two (or more) subtypes. –Disjoint Rule: No –Overlap Rule: Yes (Fig. 4-7)

17 (a) Disjoint rule Examples of disjointness constraints

18 (b) Overlap rule

19 Constraints in Supertype/ Subtype Relationships Subtype Discriminators: An attribute of the supertype whose values determine the target subtype(s). –Disjoint (Fig. 4-8) –Overlapping (Fig. 4-9) Summary Example (Fig. 4-10)

20 Introducing a subtype discriminator (disjoint rule)

21 Subtype discriminator (overlap rule)

22 Example of supertype/subtype hierarchy

23 Classification of business rules

24 Data model segment for class scheduling

25 Sample Entity Definitions 1.Name: FACULTY Type: Regular Definition: a university employee who is academically qualified to teach courses and perform other designated duties. Identifier: Faculty_ID 2.Name: COURSE Type: Regular Definition: a module of instruction in a particular subject area Identifier: Course_ID 3.Name: SECTION Type: Weak Definition: an offering of a course during a particular semester Identifier: Section_ID (partial only)

26 Sample Attribute Definitions 1.Name: Faculty_ID Domain: Person_IDs Definition: unique identifier of a faculty member Null: no 2.Name: Faculty_Name Domain: Person_Names Definition: name of a faculty member Null: no 3.Name: Course_ID Type: Course_ID Definition: unique identifier of a course Null: no

27 Sample Relationship Definitions 1.Name: Is_qualified Type: Binary M:N Description: associates each faculty member with course(s) he or she is qualified to teach based on academic preparation and experience Constraints: each faculty must be qualified to teach at least one course Attributes: Date_Qualified 2.Name: Is_scheduled Type: Binary M:N Description: associates each course with the sections that have been scheduled for that course. Constraints: identifying relationship Attributes: none

28 Sample Domain Constraints 1.Name: Person_IDs Data Type: Character Allowable Character: digits 2.Name: Person_Names Data Type: Character Max Length: 30 3.Name: Course_IDs Data Type: Character Format: ssss nnnn ssss = subject nnnn = course number

29 Relationship between attributes and domains

30 Representing a business rule (a) Simple E-R diagram segment

31 (b) Adding symbol to enforce business rule

32 Business Rule 1: For a faculty member to be assigned to teach a section of a course, the faculty member must be qualified to teach the course for which that section is scheduled.

33 Business Rule 2: For a faculty member to be assigned to teach a section of a course, the faculty member must not be assigned to teach a total of more than three course sections.