Add a subtype discriminator for each of the supertypes shown in Figure 3-10. Show the discriminator values that assign instances to each subtype. Use the following subtype discriminator names and values:
a. PERSON: Person Type (Employee? Alumnus? Student?)
b. EMPLOYEE: Employee Type (Faculty, Staff)
c. STUDENT: Student Type (Grad, Undergrad)
figure 3-10
Use the subtype discriminator in the university Enhanced Entity-Relationship diagram:
Subtype discriminator:
The discriminator which is used to conclude the target subtype or subtypes for individual instances required for a super type is known as subtype discriminator.
From the figure 3-10, the following subtype discriminator can be determined:
• The super type entity “PERSON” includes the attributes of “Name, Address, Gender, Date Of Birth, and Person Type”.
• The super type PERSON is further subdivided into the subtypes of “EMPLOYEE, ALUMNUS and STUDENT”.
• The subtype “EMPLOYEE” acts as the super type for “Faculty and Staff” subtypes.
• The subtype “STUDENT” act as the super type for “GRADUATE STUDENT” and “UNDERGRAD STUDENT” subtypes.
The diagrammatic representation of subtype discriminator in university EER diagram is shown below:
a)
Subtype discriminator for PERSON entity:
• The Entity person is super type.
• Here, the Person Type is a composite attribute of the “PERSON” assigned to the subtype discriminator.
• The notation to specify the subtype discriminator expression is,
Person Type = (either the Employee? = “Y” or
Alumnus? = “Y” or Student? = “Y”)
• Super type, “PERSON” contains three subtypes ”EMPLOYEE”,”ALUMNUS”, and ”STUDENT”.
• Here, the rule “overlap” is applied. Then, the “PERSON” super type may have all the subtype entities “STUDENT”, “ALUMNUS”, and ”EMPLOYEE” at same time.
• From super type “PERSON” to subtype “EMPLOYEE, ALUMNUS or STUDENT” there is a total specialization that is Person has to be either “EMPLOYEE, ALUMNUS or STUDENT”.
b)
Subtype discriminator for EMPLOYEE entity:
• The entity “EMPLOYEE” acts as super type for the Sub type entities “FACULTY” and “STAFF”. at the same time acts as sub type for super type “PERSON”
• Here, the “Employee Type” is an attribute of the “EMPLOYEE” and is a subtype discriminator.
• The notation to specify the subtype discriminator expression is,
Employee Type = (either the “Faculty” or “Staff”)
• Here, the rule “disjoint” is applied. That is the “EMPLOYEE” can be either “FACULTY or STAFF”, but not both at the same time.
c)
Subtype discriminator for STUDENT entity:
• The entity “STUDENT” acts as super type for the Sub type entities “GRADUATE STUDENT and UNDERGRAD STUDENT” at the same time acts as sub type for super type “PERSON”
• Here, the Student Type is an attribute of the “STUDENT” assigned to the subtype discriminator.
• The notation to specify the subtype discriminator expression is,
Student Type = (either the “Grad” or “Undergrad”).
• Here, the rule “disjoint” is applied. This is the “STUDENT” can be either “GRADUATE STUDENT and UNDERGRAD STUDENT”, but not both at the same time.
•
Thus, sub type discriminator is added for each of the super types shown in figure 3-10.