Database Reference
In-Depth Information
this relationship as you would any other many-to-many relationship—with a linking table.
There is currently no way to associate a given part to other parts within the table, so you
must create a new field for this purpose. Say, for example, that you create a field called
C OMPONENT ID.Thisfieldwillstorethepartidentification numberofapartthatservesasa
component of a parent part. You can now use the P ART ID and C OMPONENT ID fields as the
basis for the linking table. For the sake of our example, we'll assume that the name of the
new linking table is PART COMPONENTS. Once you've created and named the linking
table, be sure to revise the relationship diagram for the PARTS table. Figure 10.49 shows
the results of your work.
Figure 10.49. Establishing the self-referencing many-to-many relationship for the
PARTS table
As you can see, the PARTS table now has two distinct one-to-many relationships with the
PARTCOMPONENTS table. Thefirstrelationship isestablished viatheP ART IDfieldand
the second relationship is established via the C OMPONENT ID field. Figure 10.50 illustrates
how these relationships work. Note that a clamp assembly (Part ID 704) contains three
components and is itself a component of a seat assembly (Part ID 707) and a frame as-
sembly (Part ID 711).
Search WWH ::




Custom Search