Database Reference
In-Depth Information
CLASS
CLASS
ClassName
ClassName
NumberHours
Description
NumberHours
Description
SECTION
ClassName
SectionNumber
SECTION
ClassName (FK)
SectionNumber
ClassDays
Time
Professor
ClassDays
Time
Professor
Figure 6-15
Transformation of
ID-Dependent Entities in an
Archetype/Instance Pattern
(a) Data Model with Archetype/Instance
Pattern from Figure 5-30
(b) Database Design for
Archetype/Instance Pattern
table as a foreign key. Figure 6-16(a) shows a copy of the data model in Figure 5-31 in which
SECTION has been given the identifier ReferenceNumber. In the relational database design
in Figure 6-16(b), ClassName (the primary key of the parent CLASS table) has been placed in
SECTION (the child table) as a foreign key.
Keep in mind, however, that even though SECTION is no longer ID-dependent, it is
still weak. SECTION requires a CLASS for its existence. This means that a SECTION must
always have a CLASS as its parent, and this restriction arises from logical necessity, not just
from application requirements. The fact that SECTION is weak should be recorded in design
documentation.
CLASS
CLASS
Figure 6-16
Transformation of the
Archetype/Instance Pattern
Using Non-ID-Dependent
Weak Entities
ClassName
ClassName
NumberHours
Description
NumberHours
Description
SECTION is weak,
but not ID-dependent.
SECTION
SECTION
ReferenceNumber
ReferenceNumber
ClassDays
Time
Professor
SectionNumber
ClassDays
Time
Professor
SectionNumber
ClassName (FK)
(a) Data Model with Non-ID-Dependent
Weak Entity from Figure 5-31
(b) Database Design for
Non-ID-Dependent Weak Entity
 
Search WWH ::




Custom Search