1.5. Database Tables Used in This Book

This section describes a database or library of tables that is used by an imaginary computer hardware and software manufacturer. The library consists of six tables: customer, inventory, invoice, manufacturers, products, and purchases. The examples used throughout this book are based on this library (database) of tables and are described and displayed below. An alphabetical description of each table used throughout this book appears below.

1.5.1. CUSTOMERS Table

The CUSTOMERS table contains data on customers that have purchased computer hardware and software products from a manufacturer. Each customer is uniquely identified with a customer number. A description of each column in the customers table follows.

 CUSTOMERS
CUSTNUMUnique number identifying the customer
CUSTNAMEName of customer
CUSTCITYCity where customer is located

1.5.2. INVENTORY Table

The INVENTORY table contains customer inventory information consisting of computer hardware and software products. The inventory table contains no historical data. As inventories are replenished, the old quantity is overwritten with the new quantity. A description of each column in the inventory table follows.

 INVENTORY
PRODNUMUnique number identifying product
MANUNUMUnique number identifying the manufacturer
INVENQTYNumber of units of product in stock
ORDDATEDate product was last ordered
INVENCSTCost of inventory in customer’s stock room

1.5.3. INVOICE Table

The INVOICE table contains information about customer purchases. Each invoice is uniquely identified with an invoice number. A description of each column in the invoice table follows:

 INVOICE
INVNUMUnique number identifying the invoice
MANUNUMUnique number identifying the manufacturer
CUSTNUMCustomer number
PRODNUMProduct number
INVQTYNumber of units sold
INVPRICEUnit price

1.5.4. MANUFACTURERS Table

The MANUFACTURERS table contains data about companies that make computer hardware and software products. Two companies cannot have the same name. No historical data is kept in this table. If a company is sold or stops making computer hardware or software, then the manufacturer is dropped from the table. In the event a manufacturer has an address change, the old address is overwritten with the new address. A description of each column in the manufacturers table follows.

 MANUFACTURERS
MANUNUMUnique number identifying the manufacturer
MANUNAMEName of manufacturer
MANUCITYCity where manufacturer is located
MANUSTATState where manufacturer is located

1.5.5. PRODUCTS Table

The PRODUCTS table contains data about computer hardware and software products offered for sale by the manufacturer. Each product is uniquely identified with a product number. A description of each column in the products table follows.

 PRODUCTS
PRODNUMUnique number identifying the product
PRODNAMEName of product
MANUNUMUnique number identifying the manufacturer
PRODTYPEType of product
PRODCOSTCost of product

1.5.6. PURCHASES Table

The PURCHASES table contains information about computer hardware and software products purchased by customers. Each product is uniquely identified with a product number. A description of each column in the purchases table follows.

 PURCHASES
CUSTNUMUnique number identifying the product
ITEMName of product
UNITSUnique number identifying the manufacturer
UNITCOSTCost of product

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

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