chapter_04 E-R Model
chapter_04 E-R Model
Chapter 4
In this chapter, you will
learn:
How relationships between entities are
defined and refined, and how such
relationships are incorporated into the
database design process
How ERD components affect database
design and implementation
How to interpret the modeling symbols for the
four most popular ER modeling tools
That real-world database design often
requires that you reconcile conflicting goals
The Entity Relationship
(ER) Model
ER model forms the basis of an ER diagram
ERD represents the conceptual database as
viewed by end user
ERDs depict the ER model’s three main
components:
Entities
Attributes
Relationships
Entities
Refers to the entity set and not to a single
entity occurrence
Corresponds to a table and not to a row in the
relational environment
In both the Chen and Crow’s Foot models, an
entity is represented by a rectangle
containing the entity’s name
Entity name, a noun, is usually written in
capital letters
Attributes
Characteristics of entities
In Chen model, attributes are represented by
ovals and are connected to the entity
rectangle with a line
Each oval contains the name of the attribute it
represents
In the Crow’s Foot model, the attributes are
simply written in the attribute box below the
entity rectangle
The Attributes of the
STUDENT Entity
Domains
Attributes have a domain:
Simple attribute
Single-value attribute
Multivalued attributes
A Multivalued Attribute
in an Entity
Resolving Multivalued
Attribute Problems
Although the conceptual model can handle
multivalued attributes, you should not
implement them in the relational DBMS
Within original entity, create several new
attributes, one for each of the original
multivalued attribute’s components
Can lead to major structural problems in the table
Create a new entity composed of original
multivalued attribute’s components
Splitting the Multivalued
Attribute into New Attributes
Components of the
Multivalued Attribute
A New Entity Set Composed of a
Multivalued Attribute’s Components
Derived Attributes
Attribute whose value may be calculated
(derived) from other attributes
Mandatory:
Supertype entity
Contains shared attributes
Subtype entity
Contains unique attributes
Nulls Created by Unique
Attributes
A Generalization
Hierarchy
Disjoint Subtypes
Also known as non-overlapping
subtypes
Iterative process
Relationships
Attributes