Section 12.2.  Our example database

Prev don't be afraid of buying books Next

12.2. Our example database

Worldwide Widget Corporation is famous for its award-winning employee incentive program. Managers are given an incentive budget with which they can purchase discontinued Widget Wear items to reward outstanding people.

To keep track of these internal reward sales, the company maintains a small, simple Access database named order.mdb. Its design is shown in Figure 12-1. You can find the order.mdb database among the example files for this book.

Figure 12-1. The order database design (order.mdb)




There are three tables: ORDERS, ORDER_ITEMS, and PRODUCTS. The ORDERS table contains such information as the order number, date, customer name, and shipping address. The primary key of the ORDERS table is the ORD_NUM column. The table contents are shown in Figure 12-2.

Figure 12-2. The ORDERS table contents




The PRODUCTS table contains information such as product number, name, price and department. Its primary key is the NUM column. Its contents are shown in Figure 12-3.

Figure 12-3. The PRODUCTS table contents




The ORDER_ITEMS table contains the list of items for each order. Its primary key is a combination of the ORDER_NUM column, which has a foreign key relationship to the ORD_NUM column of ORDERS, and the PROD_NUM column, which has a foreign key relationship to the NUM column of PRODUCTS. Its contents are shown in Figure 12-4.

Figure 12-4. The ORDER_ITEMS table contents




Amazon


XML in Office 2003. Information Sharing with Desktop XML
XML in Office 2003: Information Sharing with Desktop XML
ISBN: 013142193X
EAN: 2147483647
Year: 2003
Pages: 176

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net