DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 8
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-2 Agenda Questions? Assignment 3 Due Assignment 4 will be assigned next class and will due after Winter Break on April 1 (no Joke) Quiz one will be on Feb 15 (change from Syllabus) –DP chap 1-4, Oracle Chap 1-2 –15 4 points each, – 5 Short 8 points each. –Open Book, Open notes, 50 Min Capstone Proposals Due next Thursday, Feb 15 –Capstone Project Description sp 07.htmCapstone Project Description sp 07.htm Continue Discussion on Data Modeling with the Entity- Relationship Model
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-3 Subtype Entities A subtype entity is a special case of a supertype entity: –STUDENT : UNDERGRADUATE or GRADUATE The supertype contains all common attributes, while the subtypes contain specific attributes. The supertype may have a discriminator attribute that indicates the subtype.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-4 Subtypes with a Discriminator
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-5 Subtypes: Exclusive or Inclusive If subtypes are exclusive, one supertype relates to at most one subtype. If subtypes are inclusive, one supertype can relate to one or more subtypes.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-6 Subtypes: Exclusive or Inclusive (Continued)
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-7 Subtypes: IS-A relationships Relationships connecting supertypes and subtypes are called IS-A relationships, because a subtype IS A supertype. The identifier of the supertype and all of its subtypes must be identical, i.e., the identifier of the supertype becomes the identifier of the related subtype(s). Subtypes are used to avoid value- inappropriate nulls.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-8 ERwin Symbol Summary
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-9 ERwin Symbol Summary (Continued)
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-10 David M. Kroenke’s Database Processing Fundamentals, Design, and Implementation (10 th Edition) End of Presentation: Chapter Five Part One
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-11 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship Model Part Two Database Processing: Fundamentals, Design, and Implementation
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-12 Strong Entity Patterns: 1:1 Strong Entity Relationships
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-13 Strong Entity Patterns: 1:1 Strong Entity Relationships
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-14 Strong Entity Patterns: 1:N Strong Entity Relationships
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-15 Strong Entity Patterns: 1:N Strong Entity Relationships
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-16 Strong Entity Patterns: N:M Strong Entity Relationships
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-17 Strong Entity Patterns: N:M Strong Entity Relationships
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-18 Strong Entity Patterns: N:M Strong Entity Relationships
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-19 ID-Dependent Relationships: The Association Pattern Note the Price column, which has been added.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-20 ID-Dependent Relationships: The Association Pattern
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-21 ID-Dependent Relationships: The Multivaled Attribute Pattern
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-22 ID-Dependent Relationships: The Multivaled Attribute Pattern
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-23 ID-Dependent Relationships: The Multivaled Attribute Pattern
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-24 ID-Dependent Relationships: The Multivalued Attribute Pattern
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-25 ID-Dependent Relationships: The Archtype/Instance Pattern The archtype/instance pattern occurs when the ID-dependent child entity is the physical manisfestation (instance) of an abstract or logical parent: –PAINTING : PRINT –CLASS : SECTION –YACHT_DESIGN : YACHT –HOUSE_MODEL: HOUSE
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-26 ID-Dependent Relationships: The Archtype/Instance Pattern Note that these are true ID-dependent relationships - the identifier of the parent appears as part of the composite identifier of the ID- dependent child.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-27 ID-Dependent Relationships: The Archtype/Instance Pattern Note the use of weak, but not ID- dependent children.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-28 David M. Kroenke’s Database Processing Fundamentals, Design, and Implementation (10 th Edition) End of Presentation: Chapter Five Part Two
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-29 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship Model Part Three Database Processing: Fundamentals, Design, and Implementation
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-30 Mixed Patterns: The Line-Item Pattern
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-31 Mixed Patterns: The Line-Item Pattern
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-32 Mixed Patterns: Other Mixed Patterns Look for a mixed pattern where: –A strong entity has a multivalued composite group, and –One of the elements of the composite group is an identifier of another strong entity
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-33 Mixed Patterns: Other Mixed Patterns
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-34 Mixed Patterns: Other Mixed Patterns
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-35 Mixed Patterns: The For-Use-By Pattern
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-36 Mixed Patterns: The For-Use-By Pattern
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-37 Recursive Relationships A recursive relationship occurs when an entity has a relationship to itself
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-38 Recursive Patterns: 1:1 Recursive Relationship
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-39 Recursive Patterns: 1:N Recursive Relationship
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-40 Recursive Patterns: N:M Recursive Relationship