Page 106 - DCAP402_DCAO204_DATABASE MANAGEMENT SYSTEM_MANAGING DATABASE
P. 106
Unit 6: Relational Language and Database Design
Notes
Example: Can Akbar be both an Hourly-Emps entity and a Contract-Emps entity?
The answer is, No.
Other example, can Akbar be both a Contract-Emps entity and a Senior-Emps entity (among
them)?
The answer is, Yes. Thus, this is a specialisation hierarchy property. We denote this by
writing “Contract-Emps OVERLAPS Senior-Emps”.
2. Covering Constraints: Covering constraints determine whether the entities in the
subclasses collectively include all entities in the superclass.
Example: Should every Employee be a Hourly-Emps or .Contract-Emps?
The Answer is, No. He can be a Daily-Emps.
Other example, should every Motor-vehicle (superclass) be a Bike (subclass) or a Car
(subclass)?
The Answer is YES.
Thus generalization hierarchies property is that every instance of a superclass is an instance
of a subclass.
We denote this by writing “ Bikes and Cars COVER Motor-vehicles”.
6.11.2 Aggregation
Aggregation allows us to indicate that a relationship set (identified through a dashed box)
participates in another relationship sets. That is, a relationship set in an association between
entity sets. Sometimes we have to model a relationship between a collection of entities and
relationships.
Example: Suppose that we have an entity set called Project and that each Project entity is
sponsored by one or more departments. Thus, the sponsors relationship set captures this
information but, a department that sponsors a project, might assign employees to monitor the
sponsorship. Therefore, Monitors should be a relationship set that associates a sponsors
relationship (rather than a Project or Department entity) with an Employees entity. However,
again we have to define relationships to associate two or more entities.
Use of Aggregation
We use an aggregation, when we need to express a relationship among relationships. Thus,
there are really two distinct relationships, Sponsors and Monitors, each with its own attributes.
Example: The Monitors relationship has an attribute until that records the ending date
until when the employee is appointed as the sponsorship monitoring. Compare, this attribute
with the attribute since of Sponsors, which is the starting date when the sponsorship took effect.
Task Specialisation and generalisation are two important concepts of EER. What
is your opinion?
LOVELY PROFESSIONAL UNIVERSITY 99