Appendix B. DB2MALL Database

To illustrate the examples and samples in this book, we have created a simple database called DB2MALL.

The plot behind the DB2MALL database is the following:

Consider an actual mall with several stores in it. All the stores are defined in the STORE tables. Each store sells products. All the products carried by all stores are defined in the PRODUCT table. This table has a column called STORE_ID, which associates which store carries which product. These products are bought by customers, who are saved in a table called CUSTOMER. Every time a customer places an order, an entry is inserted into the CUSTOMER_ORDER table. This table holds the general information of the order. Also, an entry is inserted into the CUSTOMER_ORDER_ITEM table, which holds all the items the customer purchased with that specific order. When a store is running out of a certain product, the store places an order with its supplier to receive more of that product. These orders are kept in the STORE_PURCHASE table and the stores' suppliers are saved in the SUPPLIER table.

We have also created the following tables as shown in Table B.1 below.

Table B.1. Other DB2MALL tables
Table NameExplanation
DELIVERY_METHODThe available delivery methods via which a product is sent to a customer.
PAYMENT_METHODThe available methods of payment
ORDER_STATUSThe current status at which an order is in, e.g. “on hold,” “complete,” “open,” etc.
PRODUCT_STATUSThe current status at which a product is in, e.g. “active,” “discontinued,” etc.

A complete description of each table and its column definitions is provided in the DB2MALL.README file located in the /DB2MALL directory on the Compact Disc which comes with this book.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.193.7