CSC271 Database Systems Lecture # 25. Summary: Previous Lecture  Structural constraints  Multiplicity  Cardinality  Participation  Connection traps.

Slides:



Advertisements
Similar presentations
Chapter 12 Enhanced Entity-Relationship Modeling Transparencies © Pearson Education Limited 1995, 2005.
Advertisements

1 Pertemuan Perluasan E-R Matakuliah: >/ > Tahun: > Versi: >
© Shamkant B. Navathe CC. © Shamkant B. Navathe CC Chapter 4 - Part I Enhanced Entity-Relationship and UML Modeling Copyright © 2004 Ramez Elmasri and.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1.
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.
1 Database Systems: A Practical Approach to Design, Implementation and Management International Computer Science S. Carolyn Begg, Thomas Connolly Lecture.
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
Entity-Relationship (E-R) Model
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:
EXTENDED-ER (EER) MODEL CONCEPTS. Enhanced-ER (EER) Model Concepts  Basic ER diagram + more concepts =EER model  Additional concepts:  Subclasses/superclasses.
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,
Entity-Relationship modeling Transparencies
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
Team Dosen UMN ER Modelling Connolly Book Chapter
Entity-relationship Modeling Transparencies 1. ©Pearson Education 2009 Objectives How to use ER modeling in database design. The basic concepts of an.
Entities and Attributes
Entity Relationship Modeling
© 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)
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
Chapter 11 & 12 Entity-Relationship (E-R) Model Characteristics of E-R Model Components of E-R Model Example of E-R Model Enhanced E-R 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.
Enhanced Entity-Relationship Modeling
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)
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.
Chapter 4 Extended Entity-Relationship (EER)Model Incorporates Set-subset Relationships Incorporates Generalization Hierarchies Constraints: Coverage Constraints:
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
Extended ER Modelling. Extended E-R Features: Specialization Top-down design process; we designate subgroupings within an entity set that are distinctive.
Basic ER modeling was adequate for simpler databases, but in the 1980’s more demanding databases required more extensive modeling requirements. Some such.
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.
Enhanced Entity-Relationship (EER) Model
The Enhanced Entity- Relationship (EER) Model
Enhanced Entity-Relationship Modeling
Enhanced Entity-Relationship Modeling
© Shamkant B. Navathe CC.
Conceptual Design & ERD Modelling
The Enhanced Entity- Relationship (EER) Model
Enhanced Entity-Relationship (EER) Modeling
Session 2 Welcome: The sixth learning sequence
Enhanced ER Modeling Transparencies
Chapter 13 Enhanced Entity-Relationship Modeling
© Shamkant B. Navathe CC.
Enhanced Entity-Relationship Modeling
Chapter Entity-Relationship Modeling & Enhanced Entity- Relationship Modeling.
© Shamkant B. Navathe CC.
CS4222 Principles of Database System
Enhanced Entity-Relationship Modeling Transparencies
Enhanced Entity-Relationship Modeling Transparencies
Enhanced Entity-Relationship Modeling
Sampath Jayarathna Cal Poly Pomona
Chapter Entity-Relationship Modeling & Enhanced Entity- Relationship Modeling.
Database EER.
ENHANCED ENTITY-RELATIONSHIP (EER) MODEL
Sampath Jayarathna Cal Poly Pomona
© Shamkant B. Navathe CC.
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship Modeling
Enhanced Entity-Relationship (EER) Modeling
Enhanced Entity-Relationship Modeling
Presentation transcript:

CSC271 Database Systems Lecture # 25

Summary: Previous Lecture  Structural constraints  Multiplicity  Cardinality  Participation  Connection traps  Fan traps  Chasm traps

Enhanced Entity-Relationship Modeling Chapter 12

Enhanced Entity-Relationship Model  Since 1980s there has been an increase in emergence of new database applications with more demanding requirements  Basic concepts of ER modeling are not sufficient to represent requirements of newer, more complex applications  Response is development of additional ‘semantic’ modeling concepts

Enhanced Entity-Relationship Model..  The ER model supported with additional semantic concepts is called the Enhanced Entity– Relationship (EER) model  Examples of additional concepts of the EER model, namely specialization/generalization, aggregation, and composition

Specialization/Generalization  Superclass  An entity type that includes one or more distinct subgroupings of its occurrences, which require to be represented in a data model  Subclass  A distinct subgrouping of occurrences of an entity type, which require to be represented in a data model  For example, the Staff superclass may have subclasses as Manager, SalesPersonnel, and Secretary etc.

Specialization/Generalization..  Each member of a subclass is also a member of the superclass  In other words, the entity in the subclass is the same entity in the superclass, but has a distinct role e.g. Manager/Supervisor is also a Staff etc.  The relationship between a superclass and a subclass is one-to-one (1:1) and is called a superclass/subclass relationship

Specialization/Generalization..  Some superclasses may contain overlapping subclasses, e.g. a member of staff who is both a Manager and a member of Sales Personnel  Not every member of a superclass need be a member of a subclass, e.g. members of staff without a distinct job role such as a Manager or a member of Sales Personnel

Specialization/Generalization..  Superclasses and subclasses are used to avoid describing different types of staff with possibly different attributes within a single entity  For example, Sales Personnel may have special attributes such as salesArea and carAllowance  By using a single entity will result in a lot of nulls  Similarly some relationships are only associated with particular types of staff (subclasses), e.g. SalesPersonnel Uses Car etc.

Specialization/Generalization..

 There are two important reasons for introducing the concepts of superclasses and subclasses into an ER model  Firstly, it avoids describing similar concepts more than once, thereby saving time for the designer and making the ER diagram more readable  Secondly, it adds more semantic information to the design in a form that is familiar to many people e.g. the assertions that ‘Manager IS-A member of staff’ and ‘flat IS-A type of property’, communicates significant semantic content in a concise form

Specialization/Generalization..  There are two important reasons for introducing the concepts of superclasses and subclasses into an ER model  Firstly, it avoids describing similar concepts more than once, thereby saving time for the designer and making the ER diagram more readable  Secondly, it adds more semantic information to the design in a form that is familiar to many people e.g. the assertions that ‘Manager IS-A member of staff’ and ‘flat IS-A type of property’, communicates significant semantic content in a concise form

Specialization/Generalization..  Attribute Inheritance  An entity in a subclass represents the same ‘real world’ object as in the superclass, and may possess subclass-specific attributes, as well as those associated with the superclass  A subclass is an entity in its own right and so it may also have one or more subclasses

Specialization/Generalization..  Attribute Inheritance  An entity and its subclasses and their subclasses, and so on, is called a type hierarchy  Type hierarchies are known by a variety of names including:  Specialization hierarchy  Generalization hierarchy  IS-A hierarchy  A subclass with more than one superclass is called a shared subclass (multiple inheritance)

Specialization/Generalization..  Specialization  The process of maximizing differences between members of an entity by identifying their distinguishing characteristics  Specialization is a top-down approach to defining a set of superclasses and their related subclasses  The set of subclasses is defined on the basis of some distinguishing characteristics of the entities in the superclass

Specialization/Generalization..

Diagrammatic Representation  The subclasses are attached by lines to a triangle that points toward the superclass  The label below the specialization/generalization triangle, shown as {Optional, And}, describes the constraints on the relationship between the superclass and its subclasses  Attributes that are specific to a given subclass are listed in the lower section of the rectangle representing that subclass  Attributes that are common to all subclasses are listed in the lower section of the rectangle representing the superclass

Specialization/Generalization..

Constraints: Specialization/Generalization  Participation constraint  Determines whether every member in the superclass must participate as a member of a subclass  May be mandatory or optional  A superclass/subclass relationship with mandatory participation specifies that every member in the superclass must also be a member of a subclass e.g. contract of employment  A superclass/subclass relationship with optional participation specifies that a member of a superclass need not belong to any of its subclasses e.g. job role

Constraints: Specialization/Generalization  Disjoint constraint  Describes the relationship between members of the subclasses and indicates whether it is possible for a member of a superclass to be a member of one, or more than one, subclass  The disjoint constraint only applies when a superclass has more than one subclass  If the subclasses are disjoint, then an entity occurrence can be a member of only one of the subclasses

Constraints: Specialization/Generalization  Disjoint constraint  To represent a disjoint superclass/subclass relationship, ‘Or’ is placed next to the participation constraint within the curly brackets e.g. contract of employment specialization/generalization is disjoint, which means that a member of staff must have a full- time permanent or a part-time temporary contract, but not both

Constraints: Specialization/Generalization  Disjoint constraint  If subclasses of a specialization/generalization are not disjoint (called nondisjoint), then an entity occurrence may be a member of more than one subclass  To represent a nondisjoint superclass/subclass relationship, ‘And’ is placed next to the participation constraint within the curly brackets  For example, the job role specialization/ generalization is nondisjoint, which means that an entity occurrence can be a member of both the Manager, and SalesPersonnel subclasses (shared subclass SalesManager)

Constraints: Specialization/Generalization  Disjoint constraint  Note that it is not necessary to include the disjoint constraint for hierarchies that have a single subclass at a given level and for this reason only the participation constraint is shown for the SalesManager and AssistantSecretary subclasses

Categories: Disjoint/Participation  The disjoint and participation constraints of specialization and generalization are distinct, giving rise to four categories:  Mandatory and disjoint (Or)  Optional and disjoint (Or)  Mandatory and nondisjoint (And)  Optional and nondisjoint (And)

DreamHome Branch View

Aggregation  Represents a ‘has-a’ or ‘is-part-of’ relationship between entity types, where one represents the ‘whole’ and the other the ‘part’  A relationship represents an association between two entity types that are conceptually at the same level  One entity represents a larger entity (the ‘whole’), consisting of smaller entities (the ‘parts’)  Aggregation does not change the meaning of navigation across the relationship between the whole and its parts, nor does it link the lifetimes of the whole and its parts e.g. the Has relationship, which relates the Branch entity (the ‘whole’) to the Staff entity (the ‘part’)

Aggregation

Composition  A specific form of aggregation that represents an association between entities, where there is a strong ownership and coincidental lifetime between the ‘whole’ and the ‘part’  The ‘whole’ is responsible for the disposition of the ‘parts’, which means that the composition must manage the creation and destruction of its ‘parts’  In other words, an object may only be part of one composite at a time

Composition

Important  If we remember that the major aim of a data model is to unambiguously and accurately communicate an understanding of the enterprise data  We should only use the additional concepts of aggregation and composition when the enterprise data is too complex to easily represent using only the basic concepts of the ER model

Summary  Enhanced Entity-Relationship (EER) model  Specialization/Generalization  Specialization/Generalization constraints  Aggregation  Composition  Application of EER concepts to DreamHome

References  All the material (slides, diagrams etc.) presented in this lecture is taken (with modifications) from the Pearson Education website : 