Database Reference
In-Depth Information
In the categorization relationship, the key of the super type entity is also used as the key for
the subtype entities. A faculty member can be a professor, an instructor, or a researcher. If a fac-
ulty member cannot be in two categories at the same time, the relationship can also be called an
Exclusive OR relationship.
When two entities related by a relationship are of two diferent logical types, the relation-
ship is a HAS-A relationship. For example, the nonidentifying relationship between the entities
FACULTY and STUDENT is a HAS-A relationship. In contrast, if the related entities have the
same logical type, we say the relationship is an IS-A relationship. An IS-A relationship can be used
to represent the relationship that connects a super type to a subtype. For example, the categoriza-
tion relationship that relates the entities FACULTY and PROFESSOR is an IS-A relationship.
he number of entities associated by a relationship is the degree of the relationship. For exam-
ple, the nonidentifying relationship that connects the entities FACULTY and STUDENT has
a degree of 2. Relationships with a degree of 2 are the most used relationships. here are other
relationships with degrees diferent from 2. hese relationships will be described in the following
paragraphs.
Recursive relationship : A recursive relationship relates an entity to itself. It represents a self-
join relationship. For example, suppose that each faculty member is related to the dean who is
also a faculty member. he relationship between the dean and the group of faculty members is a
recursive relationship shown in Figure 2.11.
Since the dean is managing many other faculty members, this recursive relationship is a 1: N
relationship. he dashed line indicates that the relationship is nonidentifying. here can be a M : N
recursive relationship (nonspeciic). In such a case, an intersection entity is used to connect an
entity to itself. As an example, consider the COURSE entity. By the requirement analysis, a course
can have many prerequisites and a prerequisite can be used by many courses. he M : N recursive
relationship is displayed in Figure 2.12.
Notice that the attribute Prerequisite pairs up with the CourseID attribute to form a key.
One instance of CourseID can be paired up with multiple Prerequisite instances or multiple
CourseID instances can be paired up with a Prerequisite instance. Since it is required that all the
FACULT Y
FacultyID
FirstName
LastName
Department
Dean (FK)
Figure 2.11
Recursive relationship.
COURSE
COURSE_PREREQUISITE
CourseID
CourseID (FK)
Prerequisite (FK)
P
CourseID
Credit
Description
Figure 2.12
M : N recursive relationship.
Search WWH ::




Custom Search