Page 101 - DCAP402_DCAO204_DATABASE MANAGEMENT SYSTEM_MANAGING DATABASE
P. 101
Database Management Systems/Managing Database
Notes 5. Dependents and Employees Has
6. Employees and Employees Supervises
Some problems may not have recursive relationship sets but some do have. In fact, our Company
database has one such relationship set called Supervises. You can complete this step adding
possible descriptive attributes of the relationship sets (Manages has StartDate and WorksOn has
Hours).
Step 4: Identify the Cardinality Ratio and Participation Constraints
This step is relatively a simple one. Simply apply the business rules and your common sense. So,
we write the structural constraints for our example as follows:
1. WorksFor N: 1 Total on either side
2. Manages 1: 1 Total on Employees and Partial on Departments side
3. Controls 1: N Total on either side
4. WorksOn M: N Total on either side
5. Has 1: M Total on Dependents and Partial on Employees
Step 5: Identify the IS-A and Has-A Relationship Sets
The last step is to look for “is-a” and “has-a” relationships sets for the given problem. As far as
the Company database is concerned, there are no generalization and aggregation relationships
in the Company database.
The complete single ER diagram by combining all the above five steps is shown in figure 6.6.
Figure 6.6
Name
Addr
Sex D No
SSN
Salary Dname DLocation
DOB
N 1
Works
Employees for Departments
1 Start 1 1
N Date
1
1 Controls
M
Supervises Manages
Has
N
N WorksOn
N
Depandants Projects
Hours
Relationship
DOB Pname PLocation
DepName
P No
Sex
94 LOVELY PROFESSIONAL UNIVERSITY