Database Systems: M. Sajid Farooq
Database Systems: M. Sajid Farooq
Database Systems: M. Sajid Farooq
SYSTEMS
LECTURE 9
M. SAJID FAROOQ
Topics to Cover
Attributes of relationships
Inheritance
Super type
Subtypes
Constraints
Completeness
Disjointness
Relationships and Subtypes
Once there has been established a super/sub entity relationship there are a
number of constraints which can be specified for this relationship for
specifying further restrictions on the relationship.
Completeness Constraint
Total Completeness
Partial Completeness
Disjointness Constraint
Disjointness rule
Overlap rule
Completeness Constraint
There are two types of completeness constraints, partial completeness constraints and
total completeness constraints.
All the instances of the supertype entity must be present in at one of the subtype
entities, i.e.—there should be not instance of the supertype entity which does not
belong to any of the subtype entity.
qualification
Completeness Constraint
This type of situation exists when we do not identify all subtype entities
associated with a supertype entity, or ignore any subtype entity due to
less importance of least usage in a specific scenario.
Disjointness Constraint
Disjoint constraint: From the example, it is seen that there can be two
types of employees, one which are fixed salary employees and the
others are hourly paid employees.
Now the disjoint rule tells that at a certain type an employee will be
either hourly paid employee or salaried employee, he can not be placed
in both the categories in parallel.
Disjointness Constraint
Overlap Rule: This rule is in contrast with the disjoint rule, and tells that for one
instance of any supertype entity there can be multiple instances existences of the of the
instance for more then one subtype entities.
Again taking the same example of the employee in an organization we can say that one
employee who is working in an organization can be allowed to work for the company at
hourly rates also once he has completed his duty as a salaried employee.
In such a situation the employee instance record for this employee will be stored in
both the sub entity types.
Constraints