Database Reference
In-Depth Information
CLASS
ClassID
STUDENT
STUDENT_CLASS
StudentID
FirstName
LastName
Major
10-30
StudentID (FK)
ClassID (FK)
CourseName
Time
Semester
Classroom
Instructor
0-7
Grade
Figure 2.16
Cardinality of nonspeciic relationship.
BUILDING
CLASSROOM
ClassroomID
BuildingID (FK)
Contains
BuildingID
BuildingName
Capacity
Figure 2.17
Relationship naming from parent to child.
STUDENT
FACULT Y
StudentID
FacultyID
Advise/Advised by
FirstName
LastName
Major
FacultyID (FK)
FirstName
LastName
Department
Figure 2.18
Relationship naming from parent to child and from child to parent.
Figure 2.16 shows that a class can enroll 10-30 students and a student can take 0-7 classes.
So far, you have seen some symbols such as those for cardinality representations used in a rela-
tionship. Table 2.7 lists some commonly used relationship symbols.
Relationship labeling : A relationship can be labeled by a word or phrase. For example, to
emphasize the identifying relationship connecting the entities BUILDING and CLASSROOM,
where CLASSROOM is a weak entity, you may label the relationship with a verb “Contains” from
the parent to the child as shown in Figure 2.17.
Sometime, by including both verb phrases from the parent to the child and vice versa, the
meaning of a relationship may be clearer. To demonstrate this, let us name the relationship connect-
ing the entity FACULTY and STUDENT by including two verb phrases as shown in Figure 2.18.
ACTIVITY 2.1 CREATING ENTITY-RELATIONSHIP MODEL
Now that you have learned about the components of a data model, it is time to integrate
these components to represent the class registration process. Table 2.8 summarizes the rela-
tionships among the entities involved in the class registration process.
For the nonidentifying relationships, Course-Class, Weekday-Class, Time Block-
Class, and Semester-Class, we may group them together as a ternary relationship with an
 
Search WWH ::




Custom Search