Database Reference
In-Depth Information
EMPLOYEE
EmployeeName
Other Data . . .
Figure 5-41
Data Model for the
Management Structure
in Figure 5-40 as a 1:N
Recursive Relationship
Manages
Child's Red
Wagon
Handle
Assembly
Wheel
Assembly
Body
Figure 5-42
Bill of Materials
Handle
Bolt
Washer
Nut
Wheel
Axle
PART
PartName
Other Data . . .
Figure 5-43
Data Model for the Bill of
Materials in Figure 5-42 as an
N:M Recursive Relationship
By ThE Way What would happen to the data model if the diagram showed how many
of each part are used? Suppose, for example, that the wheel assembly
requires four washers and the handle assembly requires just one. The data model in
Figure 5-43 will not be correct for this circumstance. In fact, adding Quantity to this
N:M relationship is analogous to adding Price to the N:M relationship in Figure 5-22.
See Project Question 5.63.
N:M recursive relationships can be used to model directed networks, such as the flow of docu-
ments through organizational departments or the flow of gas through a pipeline. They also can be
used to model the succession of parents, in which mothers, fathers, and stepparents are included.
If recursive structures seem hard to comprehend, don't fret. They may seem strange at first,
but they are not difficult. Work through some data examples to gain confidence. Make up a train
and see how the model in Figure 5-38 applies, or change the example in Figure 5-40 from employ-
ees to departments and see how the model in Figure 5-41 needs to be adjusted. Once you have
learned to identify recursive patterns, you'll find it easy to create models for them.
The Data Modeling Process
During the data modeling process, the development team analyzes user requirements and
constructs a data model from forms, reports, data sources, and user interviews. The process is
always iterative; a model is constructed from one form or report and then supplemented and
 
 
Search WWH ::




Custom Search