Presentation is loading. Please wait.

Presentation is loading. Please wait.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-1 David M. Kroenke’s, 10 th ed. Chapter.

Similar presentations


Presentation on theme: "DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-1 David M. Kroenke’s, 10 th ed. Chapter."— Presentation transcript:

1 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-1 David M. Kroenke’s, 10 th ed. Chapter Five: Data Modeling with the Entity-Relationship Model Part One B Database Processing: Fundamentals, Design, and Implementation

2 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-2 Data Modeling Notation (a) and (b) NOT Equivalent Statements

3 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-3 Data Modeling Notation: ERwin

4 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-4 Data Modeling Notation: N:M and O-M Note that: ERwin cannot indicate true minimum cardinalities on N:M relationships Hand-draw the minimum cardinality symbol

5 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-5 ID-Dependent Entities Always a child entity Parent must exist first Identifier includes the identifier of parent The minimum cardinality –from the ID-dependent entity –to the parent is always one.

6 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-6 ID-Dependent Entities: Logical Dependence on Parent A solid line indicates an identifying relationship

7 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-7 ID-Dependent Entities: Important Features in Template Solid relationship line 1:M relationship Hash mark by parent, always Child often optional, but not always Identifier of parent part of identifier of child Parent symbol has sharp corners Child symbol has rounded corners

8 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-8 Weak Entities Existence depends upon another entity All ID-Dependent entities Other non-ID-dependent weak entities (identifier of the parent not part of the identifier of the weak child entity)

9 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-9 Non-Identifying Weak Entities A dashed line indicates a nonidentifying relationship Weak entities must be indicated by an accompanying text box in Erwin – There is no specific notation for a nonidentifying but weak entity relationship

10 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-10 Non-Identifying Weak Entities Dashed line between parent & child Hash mark by parent Parent always required Child often optional, but not always In Erwin, rounded corners not possible –For weak entity (child) –Technically, should be rounded

11 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-11 Subtype Entities A special case of a supertype entity Supertype contains all common attributes Subtypes contain specific attributes. Discriminator attribute possible –In supertype –Indicates the subtype.

12 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-12 Mutually Exclusive Subtype Example EMPLOYEE SALARIEDHOURLY FACULTY Division Salary Rank program 1 vacation title wage title salary ssn name address

13 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-13 Inclusive Subtype Example PERSON CUSTOMER EMPLOYEE title pay rate m credit limit charge card no ID name address

14 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-14 Subtypes – represent entities with optional sets of attributes Inheritance Not always mutually exclusive

15 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-15 Subtypes with a Discriminator

16 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-16 Subtypes: Exclusive or Inclusive Exclusive, one supertype relates to at most one subtype. Inclusive, one supertype can relate to one or more subtypes.

17 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-17 Subtypes: Exclusive or Inclusive (Continued)

18 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-18 Subtypes: IS-A relationships Called IS-A relationships Subtype IS A supertype Identifer of the supertype and all of its subtypes must be identical Subtypes avoid value-inappropriate nulls.

19 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-19 ERwin Symbol Summary

20 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-20 ERwin Symbol Summary (Continued)

21 DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-21 David M. Kroenke’s Database Processing Fundamentals, Design, and Implementation (10 th Edition) End of Presentation: Chapter Five Part One B


Download ppt "DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-1 David M. Kroenke’s, 10 th ed. Chapter."

Similar presentations


Ads by Google