Databases Reference
In-Depth Information
Student
StudentNum
LastName
FirstName
DormNum
ThesisTitle
ThesisArea
1253
Johnson
Ann
3
1662
Anderson
Tom
1
P.D.Q. Bach
Music
2108
Lewis
Bill
Cluster sets
Math
2546
Davis
Mary
2
2867
Albers
Cathy
2
Rad. Treatment
Medicine
211
2992
Matthew
Mark
3011
Candela
Tim
3
3574
Talen
Sue
Student
StudentDorm
StudentNum
LastName
FirstName
StudentNum
DormNum
1253
Johnson
Ann
1253
3
1662
Anderson
Tom
1662
1
2108
Lewis
Bill
2546
2
2546
Davis
Mary
2867
2
2867
Albers
Cathy
3011
3
2992
Matthew
Mark
3011
Candela
Tim
SeniorStudent
3574
Talen
Sue
StudentNum
ThesisTitle
ThesisArea
1662
P.D.Q. Bach
Music
2108
Cluster sets
Math
2867
Rad. Treatment
Medicine
FIGURE 6-30
Student table split to avoid the use of null values
The DBDL for these tables appears in Figure 6-31. The primary key of the StudentDorm and SeniorStudent
tables (StudentNum) is also a foreign key matching the student number in the new Student table.
Student (StudentNum, LastName, FirstName)
StudentDorm (StudentNum, DormNum)
FK StudentNum
→
Student
FK DormNumƒ
→
Dorm
SeniorStudent (StudentNum, ThesisTitle, ThesisArea)
FK StudentNum
→
Student
FIGURE 6-31
Sample DBDL with entity subtypes
To represent two subtypes (categories) in IDEF1X, you use the same category symbol shown in Figure 6-29.
The difference is that there will be two lines coming out of the category symbol—one to each category, as
shown in Figure 6-32. Because there are students who do not live in dorms and who are not seniors, these cat-
egories are also incomplete; so there is only one line below the category symbol.