Presentation on theme: "Database Systems: Design, Implementation, and Management Tenth Edition"— Presentation transcript: 1 Database Systems: Design, Implementation, and Management Tenth
Edition Show
2 Objectives In this chapter, students will learn: 3 The Extended Entity Relationship
Model 4 Entity Supertypes and Subtypes 5 Database Systems, 10th Edition
6 Specialization Hierarchy 7 Database Systems, 10th Edition
8 Inheritance Enables entity subtype to inherit attributes and relationships of supertype All entity subtypes inherit their primary key attribute from their supertype At
implementation level, supertype and its subtype(s) maintain a 1:1 relationship Entity subtypes inherit all relationships in which supertype entity participates Lower-level subtypes inherit all attributes and relationships from all upper-level supertypes Database Systems, 10th Edition
9 Database Systems, 10th Edition 10 Subtype Discriminator 11 Disjoint and
Overlapping Constraints
12 Database Systems, 10th Edition 13 Database Systems, 10th Edition
14 Completeness Constraint 15 Database Systems, 10th Edition
16 Specialization and Generalization 17 Specialization and Generalization (cont’d.) 18 Entity Clustering “Virtual” entity type used to represent multiple entities and relationships in ERD Considered “virtual” or
“abstract” because it is not actually an entity in final ERD Temporary entity used to represent multiple entities and relationships Eliminate undesirable consequences Avoid display of attributes when entity clusters are used Database Systems, 10th Edition 19
Database Systems, 10th Edition 20 Entity Integrity: Selecting Primary Keys 21 Natural Keys and Primary
Keys
22 Primary Key Guidelines 23 Database Systems, 10th Edition
24 When to Use Composite Primary Keys 25 Database Systems, 10th Edition
26 When to Use Composite Primary Keys (cont’d.) 27 When To Use Surrogate Primary Keys 28 When To Use Surrogate Primary Keys (cont’d.) 29 Database Systems, 10th Edition
30 Design Cases: Learning Flexible Database Design 31 Design Case 1: Implementing 1:1 Relationships 32 Design
Case 1: Implementing 1:1 Relationships (cont’d.)
33 Database Systems, 10th Edition 34 Database Systems, 10th Edition
35 Design Case 2: Maintaining History of Time-Variant Data 36
Database Systems, 10th Edition 37 Database Systems, 10th Edition
38 Design Case 3: Fan Traps Design trap occurs when relationship is improperly or incompletely identified Represented in a way not consistent with the real
world Most common design trap is known as fan trap Fan trap occurs when one entity is in two 1:M relationships to other entities Produces an association among other entities not expressed in the model Database Systems, 10th Edition 39 Database
Systems, 10th Edition 40 Database Systems, 10th Edition 41 Design Case 4:
Redundant Relationships
42 Database Systems, 10th Edition
43 Summary Extended entity relationship (EER) model adds semantics to ER model
Adds semantics via entity supertypes, subtypes, and clusters Entity supertype is a generic entity type related to one or more entity subtypes Specialization hierarchy Depicts arrangement and relationships between entity supertypes and entity subtypes Inheritance means an entity subtype inherits attributes and relationships of supertype Database Systems, 10th Edition
44 Summary (cont’d.) Subtype discriminator determines which entity subtype the supertype occurrence is related to: Partial or
total completeness Specialization vs. generalization Entity cluster is “virtual” entity type Represents multiple entities and relationships in ERD Formed by combining multiple interrelated entities and relationships into a single object Database Systems, 10th Edition
45 Summary (cont’d.) Natural keys are identifiers that exist in real world Sometimes make good primary keys Characteristics of
primary keys: Must have unique values Should be nonintelligent Must not change over time Preferably numeric or composed of single attribute Database Systems, 10th Edition 46
Summary (cont’d.) Composite keys are useful to represent 47 Summary (cont’d.) Time-variant data 48 Summary (cont’d.) Fan trap: What is a generic entity type?Generic entity type that contains the common characteristics of entity subtypes and is related to one or more subtypes. Used in specialization hierarchy to depict arrangement of higher level entity supertypes (parent entity) with lower level entity subtypes.
Is a generic entity type that is related to one or more entity subtypes?A supertype is a generic entity type that has a relationship with one or more subtypes. A subtype is a sub-grouping of the entities in an entity type that is meaningful to the organization and that shares common attributes or relationships distinct from other subgroups.
Is the attribute in the supertype entity that determines to which subtype the supertype occurrence is related?A subtype discriminator is the attribute in the supertype entity that is used to determine to which entity subtype the supertype occurrence is related.
What kind of data would you store in an entity subtype?The entity subtype will store the data that is specific to the entity; that is, attributes that are unique the subtype.
|