Datasheet
Once the TransactionMaster has been added to the QBD, you will notice that
the previously established relationship is represented, as shown in Figure 1-23.
A line connecting the two tables indicates that you don’t have to set the relation-
ship in the QBD; it is already there. You can see the one-to-many relationship,
indicating possible multiple records in TransactionMaster for each individual
customer in the CustomerMaster table.
You must now select the fields from your newly added table, which
you need to have appear in the query output. Examine the individual invoices
and invoice amounts that were issued to customers from California. Select
the following three fields from the TransactionMaster table: Invoice_Number,
Invoice_Date, and Sales_Amount. As shown in Figure 1-24, the field names
from different tables are brought together in the bottom half of the QBD.
As you can see from Figure 1-25, you now have the invoice data matched
with its appropriate customer data. Although there is repeating data, as with
the flat-file examples, there is a significant difference. The repeating data is
being read from a single source, the CustomerMaster table. If a value were to
change in the CustomerMaster table, that changed value would be repeated in
your query results. You have overcome potential update errors inherent with
duplicate data.
Figure 1-23 The relationship between the two tables is visually
represented in the top half of the QBD.
32 Chapter 1
05_59978X ch01.qxp 12/1/05 7:46 PM Page 32