Professional Documents
Culture Documents
01 Er
01 Er
Employees
1/1/01
13-324
1/4/02 34
13-322
2/2/05 12
12-824
1/1/03 76
21-397
1/1/05
Employees
supervisor sub-ordinate
Reports_to
roles
11-324 1/1/01
34
13-122 1/4/02
12
12-824
76
21-397
Arrow
denotes
11-324 1/1/01
key
34
13-122 constraint
1/4/02
12
12-824
2/2/05
76
21-397
Works_in
since
Example 1:
¾ Should address be an attribute of an employee or another
entity, such that employees are related to addresses via a
relationship?
ssn name lot
ssn name lot
Employees
Employees address
Has_addr street
Option A
Example 2:
¾ Should employment duration be a set of attributes in works_in
relationship, or a different entity?
Option B
Employees Works_in Departments
from Duration to
Example 3:
¾ Manager has a discretionary budget for each department he
manages or a total discretionary budget for all departments
ISA
Managers dbudget
¾ Use option B, if there is a total budget for all depts, otherwise there is
redundancy in option A (budget is repeated for every instance of the same
manager in the relationship set)
Intro. to Dababase Management Systems 2.21 Lecture notes by Nikos Mamoulis
Binary or Ternary Relationship?
ssn name lot pname age
Employees Dependants
Purchaser beneficiary B is accurate if
dependants rely
Option B
on policies and
policyid Policies cost a policy is held
by one employee
Intro. to Dababase Management Systems 2.22 Lecture notes by Nikos Mamoulis
More examples in your textbook
address
HKID phone dcode
dname officeno
sname