Professional Documents
Culture Documents
UNIT
3
Unit 3 introduces the extension of the basic
Entity-Relationship Diagram (ERD). This unit
introduces new notation, the supertype/subtype
relationship, to best represent the increasing
complexity of computing world. The discussion
includes the methods on creating the
supertype/subtype relationship, EERD constraints
and the subtype discriminator used in both disjoint
and overlap rules.
LESSON 1:
THE SUPERTYPE/SUBTYPE NOTATION
OBJECTIVES:
At the end of this lesson, the student will be able to:
Duration: 2 hours
The supertype is a generic type that has at least two subtypes. A subtype is a
subgrouping of the entities that are valuable to the organization. The subtypes share
common attributes, but each subtype possesses attributes or relationships distinct
from other subgroupings.
Supertype PERSON
STUDENT
Supertype/Subtype EMPLOYEE
Subtype
UNDERGRADUATE_ GRADUATE_STUDENT
ACADEMIC ADMINISTRATOR
STUDENT
As shown in figure 3.3, the supertype is the FACULTY entity type where the
attributes common to all subtypes (EmpName, BirthDate, HireDate, Address, and
ContactNo), including the identifier (Emp_ID), are placed in the supertype. On the
other hand, each subtype contains the attributes distinct only to it. Such that both
BasicSalary and RatePerHour are attributes particular to REGULAR_FACULTY,
RatePerHour is for PARTTIME_FACULTY, and ProfessionalFee is the distinctive
attribute of the GUEST_LECTURER.
• When there are attributes that are applicable only to some, but not all, of the
instances of an entity type; and
• When there is a relationship participated only by some, but not all, of the
instances of an entity type
Relationships at the supertype level indicate that all subtypes will participate
in the relationship. In figure 3.4, both the undergraduate and graduate students take
a program.
On the other hand, the relationship may be connected to the subtype level; as
such, only the instances of a subtype where the relationship is associated may
participate in a given relationship unique to that subtype. In the example, only the
undergraduate students may join in clubs
GRADING RUBRICS
Rubrics:
Weight Actual
No. Items
Score
1. The list and representation of the attributes in the
4
supertype is complete and correct.
LESSON 2:
METHODS IN DEVELOPING SUPERTYPE/SUBTYPE
RELATIONSHIPS GENERALIZATION AND
OBJECTIVES:
Duration: 2 hours
Generalization
Figure 3.5 shows three entities with common attributes, which are CitizenID,
EmpName, BirthDate, and Address. Figure 3.6 shows the generalized attribute
CITIZEN. The supertype holds the attributes shared or common to all entities, while
those distinct to each entity remain to the individual subtype. SELF_EMPLOYED
IT 202: INFORMATION MANAGEMENT 109
UNIT 1: Fundamentals of Database Systems
entity does not have a distinctive attribute; thus, it is not anymore model in the
EERD.
Specialization
undergraduate student. To control the nulls in our database, the student entity
should be sub-divided into graduate and undergraduate students. The process we
perform is specialization.
1. Think of at least three entity types with common attributes similar to figure 3.5
and create specialized attribute to form the supertype/subtype relationship such
as in figure 3.6.
ANSWER:
2. Think of one entity types where you can apply the specialization process to
come up with the supertype/subtype relationship similar to figure 3.8.
ANSWER:
GRADING RUBRICS
Rubrics:
Weight Actual
No. Items
Score
1. The attributes identified for each entity type are
5
realistic and consistent with the design standard.
LESSON 3:
CONSTRAINTS IN
SUPERTYPE/SUBTYPE RELATIONSHIPS
OBJECTIVES:
Completeness Constraints
Completeness constraints address whether an instance of a supertype is
required to be a member of at least one subtype. The completeness constraint may
be total or partial.
The total completeness rule, also known as total specialization rule, specifies
that each occurrence of an entity in the supertype must be a member of a subtype or
more. To denote the total completeness rule, we create a double line from the
supertype to the circle. Figure 3.9 shows an example of a total completeness rule.
Total Specialization
(Double Line)
Figure 3.9 shows an example of the total completeness rule. The diagram clearly
informs us that there are no other kinds of faculty except regular faculty, part time
faculty and guest lecturer.
rule, we create a single line from the supertype to the circle. Figure 3.10 shows an
example of a partial completeness rule.
Partial Specialization
(Single Line)
Disjointness Constraints
Disjointness constraints address whether an instance of a supertype is
allowed to be a member of more than one subtype simultaneously. The disjointness
constraint may be overlap or disjoint.
Disjoint Rule
The disjoint rule does not allow overlapping subtypes; thus, it specifies that an
instance of the supertype may only exist as one of the subtypes. A small letter "d" is
placed inside the circle to denote that the constraint exists is disjoint. Figure 3.11
shows an example of a disjoint rule.
Disjoint Rule
(small letter “d”)
Overlap Rule
The overlap rule allows the overlapping subtypes; thus, it specifies that an
instance of the supertype may be part of more than one subtypes simultaneously. A
small letter “o" is placed inside the circle to denote that the constraint exists is
overlap. Figure 3.12 shows an example of a disjoint rule.
Overlap Rule
(small letter “o”)
Figure 3.12 tells us that an employee instance should any of the following:
administrator, academic, or non-academic employee. Also, the employee instance is
allowed to be part of more than two subtypes. For example, an employee is both an
administrator at the same time an academic employee if he or she is teaching a
course and, at the same time, holding a position such as a department director.
ANSWER:
b. A person may or may not be one of these subtypes. At the same time, a
person who is one of these subtypes can also be one of the other subtypes
simultaneously.
ANSWER:
GRADING RUBRICS
Rubrics:
Weight Actual
No. Items
Score
1. The completeness constraint identified is correct and
4
consistent with the design standard.
LESSON 4:
SUBTYPE DISCRIMINATORS
OBJECTIVES:
Subtype Discriminator
Subtype discriminator is an attribute added to the supertype whose values
determine which subtype a particular entity instance is connected.
Subtype Discriminator
(simple attribute)
The subtype discriminator for the overlap rule is a composite attribute with
component parts that indicate the possible subtypes an instance of the supertype
belong. Figure 3.14 shows how to use subtype discriminator for the overlap rule.
Subtype Discriminator
(composite attribute)
Table 3.2. Value of the subtype discriminator fro overlap rule with description
I. Draw the equivalent EERD describe in the narrative. Show all the
constraints needed. Make sure to add the appropriate subtype
discriminator.
Different types of persons for its outreach projects support a local government
unit (LGU). The LGU is interested in the following attributes: CitizenNumber, Name,
Address (components: Barangay/City/Province/ZipCode), and ContactNumber.
There are three types of persons the LGU is interested most: employees, club
officers, and donors. Employees have distinct attribute EmployerCode while club
officers provide club affiliation information. Donors only have a relationship (named
Donates) with an ITEM entity type. A donor must have donated one or more items,
and an item may have no donors or one or more donors. The LGU records the date
when a donor donates an item. It also records in the donor’s table the date when the
donor first donates an item.
There are persons other than described above, so that a person need not
belong to any of these three groups. On the other hand, at a given time a person
may belong to two or more of these groups.
ANSWER:
GRADING RUBRICS
Rubrics:
Weight Actual
No. Items
Score
1. The list and representation of the attributes in the
5
supertype and subtypes is complete and correct.
On the other hand, each of the three groups of examinee has at least one
attribute peculiar only to the group. The freshmen have highschool average grade
and honor received. Shifters has previous course attended and transferees has
school last attended.
Every examinee are categorize as any one of the three examinee groups
given. Aside from that it should be understood that an examinee must belong to one
(and only one) kind of examinee group.
LEARNING INSIGHTS/REFLECTIONS