Database Reference
In-Depth Information
Figure 10.28. Completed table-matrix entries for the BUILDINGS table
You've just seen two examples of how to identify a relationship between a distinct pair
of tables, so let's take a look at how you identify a self-referencing relationship for a
single table. Assume you're working with the STAFF table, and you're now at the junction
between the STAFF table on the left and the STAFF table on the top. Using the techniques
you learned earlier in this section, you might pose a question such as this:
Can a single staff member be associated with one or more other
staff members?
As with the earlier examples, the answer will indicate the type of relationship. Say you re-
ceived this answer:
Yes,agivenstaffmembercanbethespouseofanotherstaffmem-
ber.
This indicates (rather obviously) that a self-referencing one-to-one relationship exists for
the STAFF table. But assume you received this answer instead:
Yes, a single staff member can manage several other staff mem-
bers.
You probably quickly realized that this answer indicates that a self-referencing one-to-
many relationship exists for the STAFF table. Identifying these two types of relationships
is a relatively easy task; identifying a self-referencing many-to-many relationship can be
slightly more difficult.
This is the type of question you must ask in order to determine whether a table has a self-
referencing many-to-many relationship: Can a single ( singular form of the table name ) be
associated with one or more other ( plural form of the table name ), and can any of those
Search WWH ::




Custom Search