Professional Documents
Culture Documents
ER Modeling
ER Modeling
A
A
It
It
Modelling
ER components
Entities: things
Relationships: associations or interactions
between entities
Tangible or intangible
Employee, enrollment
enrollmen
t
dob
Each attribute is represented by an oval and is
associated with a domain of legal values
Key attribute is underlined
stude
nt
StudentNo
Name
DOB
Address
Composite attribute
Name
Address
kota
propinsi
oval
CallNumber
Authors
book
Title
Publisher
Derived Attributes
InvNumber
date
Ammou
nt
Relationship
Entities interact using relationship
S1
c1
S2
c2
S3
c3
S4
c4
s5
c5
student
enrollment
course
Relationship
Represented as a diamond
Can have attributes that describe the
relationship
student
enrolls
course
supplier
ship
product
date
InvoiceNo
Recursive Relationship
Entities of the same type can be related
to each other
NoPeg
Name
Employe
e
Address
manages
manag
e
Managed by
Roles
Useful when two entities are related in
more than one way
Owned by
owned
owns
video
shop
located
located
has
Constraints
Cardinality
Constraints
If entities A and B have relationship:
One-to-one relationship
Each A is related to at most one B, and vice-versa
employee
E#
Name
has
healthInsurance
Policy
#
Coverages
Constraints
One-to-many relationship
There can be many Bs for each A, but only one A
for each B
employee
E#
Name
lea
d
projec
t
pnumbe
r
Constraints
Many-to-many relationship
There can be many Bs for each A and many As
for each B
student
S#
Name
enroll
course
Course
#
Desc
Participation constraint
Partial
Total
video
owned
shop
Structural constraint
Defines the (min, max) on participation
of an entity E in relationship R
video
Student
1:N
1:N
owned
enro
ll
1:1
0:N
shop
subject
Weak Entities
Some entities are only meaningful in the
context of a relationship
Dependents of an employee
SPP payment for a student
Those entities are called weak entities and
are represented using a double box
1
student
pay
SPP
ER to Relations: STEP 1
ER to Relations: STEP 2
ER to Relations: STEP 3
ER to Relations: STEP 4
ER to Relations: STEP 5
ER to Relations: STEP 6
ER to Relations: STEP 7
room
R#
Course
lecture
Course
#
Location
lecturer
Emp#
Name
Desc