©Silberschatz, Korth and Sudarshan6.2Database System Concepts - 5
th
Edition, Oct 5, 2006
Chapter 6: Entity-Relationship Model
Chapter 6: Entity-Relationship Model
Design Process
Modeling
Constraints
E-R Diagram
Design Issues
Weak Entity Sets
Extended E-R Features
Design of the Bank Database
Reduction to Relation Schemas
Database Design
UML
©Silberschatz, Korth and Sudarshan6.3Database System Concepts - 5
th
Edition, Oct 5, 2006
Modeling
Modeling
A database can be modeled as:
a collection of entities,
relationship among entities.
An entity is an object that exists and is distinguishable from other
objects.
Example: specific person, company, event, plant
Entities have attributes
Example: people have names and addresses
An entity set is a set of entities of the same type that share the same
properties.
Example: set of all persons, companies, trees, holidays
©Silberschatz, Korth and Sudarshan6.4Database System Concepts - 5
th
Edition, Oct 5, 2006
Entity Sets
Entity Sets
customer
customer
and
and
loan
loan
customer_id customer_ customer_ customer_ loan_ amount
name street city number
©Silberschatz, Korth and Sudarshan6.5Database System Concepts - 5
th
Edition, Oct 5, 2006
Relationship Sets
Relationship Sets
A relationship is an association among several entities
Example:
Hayes depositor A-102
customer entity relationship set account entity
A relationship set is a mathematical relation among n 2 entities,
each taken from entity sets
{(e
1
, e
2
, … e
n
) | e
1
E
1
, e
2
E
2
, …, e
n
E
n
}
where (e
1
, e
2
, …, e
n
) is a relationship
Example:
(Hayes, A-102) depositor