Database Reference
In-Depth Information
members to answer these questions and then take the appropriate action based on their re-
sponses.
Let's assume you were right and the organization does want to track departmental data.
Figure 10.48 shows one possible approach you might use to accomplish this task.
Figure 10.48. Results of eliminating the self-referencing relationship and adding new
structures to track departmental data
These new structures and relationships enable you to track the data efficiently and will
provide a wide variety of information about the departments. (You will, of course, ensure
that the new fields and tables conform to the various design elements that you've learned
thus far.)
It's important to note that self-referencing relationships do have their place within a well-
designed database. You should be vigilant, however, and make certain that each self-refer-
encing relationship does indeed serve a useful purpose.
Many-to-Many
You use a linking table to establish this type of self-referencing relationship, just as you do
with its dual-table counterpart. Establishing this relationship is slightly different in that the
fields you use to build the linking table come from the same parent table.
Let's revisit the PARTS table example from Figure 10.24 . Recall that this table has a self-
referencing many-to-many relationship because a particular part can comprise several dif-
ferentcomponentparts,andthatpartitselfcanbeacomponentofotherparts.Youestablish
Search WWH ::




Custom Search