Chapter 2: Entity-Relationship Model
Chapter 2: Entity-Relationship Model
Entity Sets
Entity-Relationship Model
Relationship Sets
Design Issues
Mapping Constraints
Keys
E-R Diagram
Extended E-R Features
Design of an E-R Database Schema
Reduction of an E-R Schema to Tables
Entity Sets
Note: the primary key of the strong entity set is not explicitly stored
with the weak entity set, since it is implicit in the identifying
relationship.
If loan-number were explicitly stored, payment could be made a
strong entity, but then the relationship between payment and loan
would be duplicated by an implicit relationship defined by the
attribute loan-number common to payment and loan
More Weak Entity Set Examples
In a university, a course is a strong entity and a course-offering can be
modeled as a weak entity
The discriminator of course-offering would be semester (including
year) and section-number (if there is more than one section)
If we model course-offering as a strong entity we would model course-
number as an attribute.
Then the relationship with course would be implicit in the course-
number attribute
Specialization
Top-down design process; we designate subgroupings within an entity
set that are distinctive from other entities in the set.
These subgroupings become lower-level entity sets that have
attributes or participate in relationships that do not apply to the
higher-level entity set.
Depicted by a triangle component labeled ISA (E.g. customer is a
person).
Attribute inheritance a lower-level entity set inherits all the
attributes and relationship participation of the higher-level entity set
to which it is linked.
Specialization Example
Generalization
A bottom-up design process combine a number of entity sets that
share the same features into a higher-level entity set.
Specialization and generalization are simple inversions of each other;
they are represented in an E-R diagram in the same way.
The terms specialization and generalization are used
interchangeably.
Specialization and Generalization (Contd.)