Database Reference
In-Depth Information
Figure 5-32
Data Entry Form for a
Sales Order
In Figure 5-33, CUSTOMER, SALESPERSON, and SALES_ORDER are all strong entities,
and they have the nonidentifying relationships you would expect. The relationship from
CUSTOMER to SALES_ORDER is 1:N, and the relationship from SALESPERSON to SALES_
ORDER also is 1:N. According to this model, a SALES_ORDER must have a CUSTOMER and
may or may not have a SALESPERSON. All of this is readily understood.
The interesting relationships concern the line items on the order. Examine the data grid in the
form in Figure 5-32. Some of the data values belong to the order itself, but other data values belong
to items in general. In particular, Quantity and ExtendedPrice belong to the SALES_ORDER, but
ItemNumber, Description, and UnitPrice belong to ITEM. The lines on an order do not have their
CUSTOMER
Figure 5-33
Data Model for the Sales
Order in Figure 5-32
CustomerID
SALESPERSON
LastName
FirstName
Address
City
State
Zip
Phone
SalespersonID
SalespersonLastName
SalespersonFirstName
SalespersonCode
SALES_ORDER
SalesOrderNumber
Date
Subtotal
Tax
Total
ITEM
ItemNumber
UnitPrice
Description
ORDER_LINE_ITEM
SalesOrderNumber
LineNumber
Quantity
UnitPrice
ExtendedPrice
Search WWH ::




Custom Search