162
Part II: Building Databases and Working with Data
FIGURE 7-12
The conceptual diagram of a many-to-many recursive relationship shows multiple cardinality
at each end of the relationship.PartAn associative entity is required to resolve the many-to-many relationship between the
component parts being used and the part being assembled. Figure 7-13 illustrates the BoM
(bill of materials) associative entity that has two foreign keys that both point to the Part
entity. The fi rst foreign key points to the part being built. The second foreign key points to
the source parts.Part A is constructed from two parts (a Thing1 and a bolt) and is used in the assembly of
two parts (Widget and SuperWidget).FIGURE 7-13
The physical implementation of the many-to-many refl exive relationship must include an
associative entity to resolve the many-to-many relationship, just like the many-to-many two-
entity relationship.PartPart BPart BWidgetWidgetPrimary Key: ContactIDForeignKey: AssemblyID ForeignKey: ComponentIDSuper WidgetSuper WidgetPart APart AThing 1Thing 1BoltBoltPart CPart CPart BPart AThing 1Part CWidgetWidgetSuper WidgetSuper WidgetPart APart APart ABoMc07.indd 162c07.indd 162 7/30/2012 4:18:15 PM7/30/2012 4:18:15 PM
http://www.it-ebooks.info