DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by...

download 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.

If you can't read please download the document

description

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

Transcript of DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by...

DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-1 David M. Kroenkes, 10 th ed. Chapter Five: Data Modeling with the Entity-Relationship Model Part One B Database Processing: Fundamentals, Design, and Implementation DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-2 Data Modeling Notation (a) and (b) NOT Equivalent Statements DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-3 Data Modeling Notation: ERwin DAVID M. KROENKES 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 DAVID M. KROENKES 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. DAVID M. KROENKES 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 DAVID M. KROENKES 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 DAVID M. KROENKES 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) DAVID M. KROENKES 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 DAVID M. KROENKES 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 DAVID M. KROENKES 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. DAVID M. KROENKES 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 DAVID M. KROENKES 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 DAVID M. KROENKES 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 DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-15 Subtypes with a Discriminator DAVID M. KROENKES 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. DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-17 Subtypes: Exclusive or Inclusive (Continued) DAVID M. KROENKES 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. DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-19 ERwin Symbol Summary DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-20 ERwin Symbol Summary (Continued) DAVID M. KROENKES DATABASE PROCESSING, 10th Edition 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-21 David M. Kroenkes Database Processing Fundamentals, Design, and Implementation (10 th Edition) End of Presentation: Chapter Five Part One B