Database Reference
In-Depth Information
Figure 3.9
Table design of BUILDING.
Figure 3.10
Table design of CLASSROOM.
CLASSROOM relates to BUILDING through the column BuildingId. For a given class-
room ID, you will be able to ind the related building ID located in the same row in the child
relation. By matching the building ID found in the child relation to the building ID in the
parent relation, you can get the building name in the relation BUILDING. On the other
hand, for a given building ID, you can look for all the classrooms in that speciied building
in the CLASSROOM relation. In Windows Azure SQL Database, these two relations are
constructed as shown in Figures 3.9 and 3.10.
As seen in Figure 3.10, the combination primary key in the table CLASSROOM includes
two columns, ClassroomId and BuildingId. Make sure that the deinition of the column
BuildingId in the table CLASSROOM is consistent with the deinition of BuildingId in the
table BUILDING.
2. Nonidentifying relationship : As described in Chapter 2, the relationship between the entities
FACULTY and STUDENT is a nonidentifying relationship (Figure 3.11).
Search WWH ::




Custom Search