0% found this document useful (0 votes)
30 views

Chapter 6 Database Systems Eighth Edition Presentation

This document discusses advanced data modeling concepts in database systems including the extended entity relationship model, entity supertypes and subtypes, specialization hierarchies, inheritance, subtype discriminators, disjoint and overlapping constraints, completeness constraints, and primary and surrogate keys.

Uploaded by

Ahsen Derse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views

Chapter 6 Database Systems Eighth Edition Presentation

This document discusses advanced data modeling concepts in database systems including the extended entity relationship model, entity supertypes and subtypes, specialization hierarchies, inheritance, subtype discriminators, disjoint and overlapping constraints, completeness constraints, and primary and surrogate keys.

Uploaded by

Ahsen Derse
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

Database Systems: Design,

Implementation, and
Management
Eighth Edition

Chapter 6
Advanced Data Modeling
The Extended Entity
Relationship Model
• Result of adding more semantic constructs to
original entity relationship (ER) model
• Diagram using this model is called an EER
diagram (EERD)

Database Systems, 8th Edition 2


Entity Supertypes and Subtypes

• Entity supertype
– Generic entity type related to one or more entity
subtypes
– Contains common characteristics
• Entity subtypes
– Contains unique characteristics of each entity
subtype

Database Systems, 8th Edition 3


Database Systems, 8th Edition 4
Specialization Hierarchy
• Depicts arrangement of higher-level entity
supertypes and lower-level entity subtypes
• Relationships described in terms of “IS-A”
relationships
• Subtype exists only within context of supertype
• Every subtype has only one supertype to which
it is directly related
• Can have many levels of supertype/subtype
relationships

Database Systems, 8th Edition 5


Database Systems, 8th Edition 6
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, 8th Edition 7
Database Systems, 8th Edition 8
Subtype Discriminator

• Attribute in supertype entity


– Determines to which entity subtype each
supertype occurrence is related
• Default comparison condition for subtype
discriminator attribute is equality comparison
• Subtype discriminator may be based on other
comparison condition

Database Systems, 8th Edition 9


Disjoint and Overlapping Constraints

• Disjoint subtypes
– Also known as non-overlapping subtypes
– Subtypes that contain unique subset of
supertype entity set
• Overlapping subtypes
– Subtypes that contain nonunique subsets of
supertype entity set

Database Systems, 8th Edition 10


Database Systems, 8th Edition 11
Database Systems, 8th Edition 12
Completeness Constraint
• Specifies whether entity supertype occurrence
must be a member of at least one subtype
• Partial completeness
– Symbolized by a circle over a single line
– Some supertype occurrences that are not
members of any subtype
• Total completeness
– Symbolized by a circle over a double line
– Every supertype occurrence must be member of
at least one subtype

Database Systems, 8th Edition 13


Database Systems, 8th Edition 14
Primary Key Guidelines
• Attribute that uniquely identifies entity instances
in an entity set
– Could also be combination of attributes
• Main function is to uniquely identify an entity
instance or row within a table
• Guarantee entity integrity, not to “describe” the
entity
• Primary keys and foreign keys implement
relationships among entities
– Behind the scenes, hidden from user

Database Systems, 8th Edition 15


Database Systems, 8th Edition 16
When To Use Surrogate Primary Keys

• Especially helpful when there is:


– No natural key
– Selected candidate key has embedded semantic
contents
– Selected candidate key is too long or
cumbersome

Database Systems, 8th Edition 17


When To Use Surrogate Primary Keys
(continued)
• If you use surrogate key
– Ensure that candidate key of entity in question
performs properly
– Use “unique index” and “not null” constraints

Database Systems, 8th Edition 18


Database Systems, 8th Edition 19

You might also like