Database Reference
In-Depth Information
FACULT Y
FacultyID
FirstName
LastName
JobCode
JobCode
INSTRUCTOR
PROFESSOR
FacultyID (FK)
FacultyID (FK)
Rank
OfficePhone
Position
HomePhone
Figure 3.17
Categorization relationship.
As indicated in the deinition of the relations, the key column FacultyID is shared by the
generic relation FACULTY and the speciic relations PROFESSOR and INSTRUCTOR.
In each speciic relation, the identiier of each row is the same identiier used in the generic
relation. Each row in the speciic relations PROFESSOR and INSTRUCTOR corresponds
to a row in the generic relation FACULTY.
In a categorization relationship, if you want to insert a new row to the speciic table, you
have to insert the new row in the generic table irst. For example, to insert a record about a
new professor in the table PROFESSOR, you need to irst insert a row with the FacultyID
and other general information about the new professor in the generic table FACULTY. hen,
you need to insert speciic information about the new professor in the table PROFESSOR.
Also, to query the information about the faculty, you need to irst query the general infor-
mation about the professors from the tables FACULTY and PROFESSOR, then query the
information about the instructors from the tables FACULTY and INSTRUCTOR, and get
the inal result by merging the information from the two queries. Although this is doable,
the use of the categorization relationship slows down database performance. If the attributes
in the speciic tables are similar, you may consider eliminating the use of the categorization
relationship for better performance.
5. Recursive relationship : he recursive relationship deined in Chapter 2 involves only a single
entity FACULTY. As shown in Figure 3.18, faculty members are related to the dean, who is
also a faculty member, through the foreign key Dean.
FACULT Y
FacultyID
FirstName
LastName
JobCode
Dean (FK)
Figure 3.18
Recursive relationship.
 
Search WWH ::




Custom Search