Database Reference
In-Depth Information
ciated with one or more records in (name of second table)? Considering the matrix
in Figure 10.26 , you might ask an associative question such as this:
Can a single record in CLASSES be associated with one or more
records in BUILDINGS?
You can use this type of question to determine whether a table has a self-referen-
cing relationship by making two minor modifications to the question itself: Can a
single ( singular form of the table name ) be associated with one or more ( plural
form of the table name )? For example, here's a question you might pose for the
STAFF table:
Can a single staff member be associated with one or more other
staff members?
2. Contextual: This type of question contrasts a single instance of the subject repres-
ented by the first table against multiple instances of the subject represented by the
second table. There are two categories within this type of question: ownership-ori-
ented and action-oriented.
a. Ownership-oriented questions include words or phrases such as own, has, is
part of, and contain. Here's an example of this type of question:
Can a single order contain one or more products?
You can use this question to test for a self-referencing relationship by making the
same modifications you made to the associative question. Here's an example of a
question you might pose for a PARTS table:
Can a single part contain one or more other parts?
b. Action-oriented questions incorporate action verbs such as make, visit, place,
teach, and attend. Here's an example of this type of question:
Does a single flight instructor teach one or more types of classes?
As you may have already guessed, you can use this question to test for a self-refer-
encing relationship as well by making the same modifications:
Does a single staff member manage one or more other staff mem-
bers?
Usethetypeofquestionyoubelievetobethemostappropriateforthepairoftablesyou're
working with. As you work down the list of tables in the matrix, you'll eventually realize
that you're asking questions about a given pair of tables twice—once from the perspective
of the first table and then again from the perspective of the second table. The answers to
both of these questions will identify the type of relationship that exists between the tables.
Search WWH ::




Custom Search