Presentation is loading. Please wait.

Presentation is loading. Please wait.

IS6145 Database Analysis and Design Lecture 5: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure

Similar presentations


Presentation on theme: "IS6145 Database Analysis and Design Lecture 5: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure"— Presentation transcript:

1 IS6145 Database Analysis and Design Lecture 5: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure R.Gleasure@ucc.ie www.robgleasure.com

2 IS6145 Today’s session  Enhanced Entity-Relationship Modelling  An exercise

3 The last few weeks Presentation Layer ER Diagram  Contains hashes and oval Design-specific ER Diagram (Coarse-granularity)  Uses (min, max) notation  Maps deletion rules Design-specific ER Diagram (Fine-granularity)  Maps attribute characteristics into ER diagram  Decomposes multi-valued attributes  Decomposes m:n relationships

4 The last few weeks Enhanced Entity-Relationship (EER) extends the ERD by incorporating additional constructs, specifically the superclass/subclass (SC/sc) relationship

5 An example of a superclass/subclass relationships (SC/sc) Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

6 Why bother with superclasses/subclasses? This isn’t the only option for this example, e.g. we could have…  Modelled furniture as one entity type with an attribute called furniture_type; then chair, table, and sofa would be values of that attribute  Modelled three independent entity types for chair, table, and sofa, and create three separate relationship types with the entity type store Each of these options creates redundancy

7 A vignette Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

8 Option 1: modelling student athletes with composite attributes Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

9 Option 2: modelling student athletes using inter-entity class relationships Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

10 Types of SC/sc relationships There are two basic kinds of Sc/sc relationships 1. Specialization/Generalization: One superclass (SC) is related to one or more subclasses (sc) 2. Categorization: One subclass (sc) is related to one or more superclasses (SC)

11 Specialisation and Generalisation Specialisation is the process of generating subgroups (‘sc’s) of a generic entity class (SC) by specifying the distinguishing properties (attributes) of the subgroups (= top-down approach) Generalisation, on the other hand, crystallizes the common properties (attributes) shared by a set of entity types (‘sc’s) into a generic entity type (SC) (= bottom-up approach) Notation: circle + fork (indicating subset) Read: “is-a”

12 Two important constraints of specialisation and generalisation Completeness Constraint can be one of two values 1. Total specialisation means that every entity of the superclass must participate in this specialisation/ generalisation relationship (indicated by a solid line from the superclass to the specialization/generalization symbol (i.e., the circle)) 2. Partial specialisation means that there may be entities present in the superclass that do not participate in this specialisation/generalisation (indicated by a dotted line)

13 Two important constraints of specialisation and generalisation Disjointness Constraint can also be one of two values 1. Disjointed means an entity of the superclass cannot be a member of more than one subclass (indicated by ‘D’), 2. Overlapped means an entity of the superclass can be a member of more than one subclass (indicated by ‘O’)

14 Notation for completeness and disjointness constraints Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

15 Notation for completeness and disjointness constraints Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

16 Notation for completeness and disjointness constraints Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

17 Categorisation and Aggregation The first form of this is a category construct  Notation: ‘U’ Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

18 Categorisation and Aggregation The second form of this is an aggregation construct  Notation: ‘A’ (note that an aggregate can never be partial) Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

19 An aggregate hierarchy Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

20 Example of Presentation Layer EERD Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

21 A Fine-granular Design-Specific EER Diagram for the vignette Image from Data Modeling and Database Design, By Narayan Umanath, Richard Scamell

22 Exercise For the Design-Specific EER Diagram for the vignette on the previous slide  What are the superclass entity types and subclass entity types?  What attributes are inherited by the entity type Pitcher

23 Exercise Draw a Presentation Layer ER Diagram for the following narrative  A commercial air flight stores a flight list containing both passengers and staff. This flight list detail the final destination and passport number for everyone on board. Passengers will also have data for their name, nationality and seat number. Staff will also have data for their name, job title and the number of years they have worked for the company. Some staff are contract staff, in which case their pay rate and employment agency should be listed. Other employees are permanent staff, in which case their salary, pension details, and union should be listed. Other employees are non-paid government officials, in which case their department and clearance level should be listed. For paid staff (meaning contract and permanent staff), an employee number must be stored and home location may also be listed.


Download ppt "IS6145 Database Analysis and Design Lecture 5: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure"

Similar presentations


Ads by Google