Professional Documents
Culture Documents
Topic
p Outline
Overview of Database Design
g Process
Example Database Application (COMPANY)
ER Model Concepts
Entities
E i i anddAAttributes
ib
Entity Types, Value Sets, and Key Attributes
p and Relationship
Relationships p Types
yp
Weak Entity Types
Roles and Attributes in Relationship Types
ER Diagrams
Di - Notation
N t ti
ER Diagram for COMPANY Schema
Alternative Notations – UML class diagrams, others
Overview of Database Design Process
E i is
Entity i representedd by
b a set off attributes(properties)
ib ( i )
Eg:
D
Domain
i – the
th sett off permitted
itt d values
l for
f eachh attribute
tt ib t
Attribute Types
yp
Simple and Composite
Single valued and multi valued
Entity set
Entityy Set
R l ti
Relationship
hi
An association between the instances of one or more
entity types that is of interest to the organization
Association
A i ti i di t that
indicates th t an eventt has
h occurred
d or
that there is a natural link between entity types
Explain
l i whether
h h an entity
i i
instance i
involved
l d in
i a
relationship instance can transfer participation to
another relationship instance
Relationships
p
Relationship Degree
Relationship Constraints
A Relationship
R l i hi Type
T d fi
defines the
h relationship,
l i hi and
d a
Relationship Set represents a set of relationship instances
Multiple
Supplier Supply
pp y Project Assigned_to
g _
Ternary
Part
Entity Roles
Same entity type can participate more than once in the same
relationship type under different “roles”
Employees
Supervision
Relationship Constraints
relationship
l i hi iinstances that
h an entity
i
can participate in Works_In
– Works-In is a binary relationship
– Participating entities are
Employees
DEPARTMENT : EMPLOYEE
– One department can have
Many employees -
Cardinality Ratio is 1 : N
Possible Cardinality
y Ratios
. .
11–to-1
to 1 (1 : 1) . .
– Both entities can . .
participate in only one
1-to-
to-1
relationship instance .
1-to-Many, Many-to-1
. . . .
. . .
(1 : N,, N : 1) . . .
– One entity can . .
participate in many
.
1- to - Many Many - to -
relationship instances 1
Many-to-Many (N: M) . .
– Both entities can participate in
many relationship instance . .
. .
Many--to
Many .
to--Many
Example Cardinality Constraints
Onee depa
O department
t e t ca
can eemploy
p oy many
a y eemployees
p oyees
N Works_In 1
Employees Departments
1 Manages 1
existentially dependent on
DEPARTMENT via the Works In
relationship type
Kinds off participating
p p g constraints
PARTIAL Participation
N Works_In 1
Employees
p y Departments
p
1 Manages 1
ER diagrams
di i one popular
is l example
l for
f displaying
di l i
database schemas
Many other notations exist in the literature and in
various
i d t b
database d i and
design d modeling
d li tools
t l
UML class diagrams is representative of another
way of displaying ER concepts that is used in several
commercial
i l design
d i tooll s