1.6. Table Contents
An alphabetical list of tables, variables, and attributes for each table is displayed below.
Customers CONTENTS Output -----Alphabetic List of Variables and Attributes----- Variable Type Len Pos Label custcity Char 20 25 Customer’s Home City custname Char 25 0 Customer Name custnum Num 3 45 Customer Number
Inventory CONTENTS Output -----Alphabetic List of Variables and Attributes----- Variable Type Len Pos Format Informat Label invencst Num 6 10 DOLLAR10.2 Inventory Cost invenqty Num 3 7 Inventory Quantity manunum Num 3 16 Manufacturer Number orddate Num 4 0 MMDDYY10. MMDDYY10 Date Inventory Last Ordered prodnum Num 3 4 Product Number
Invoice CONTENTS Output -----Alphabetic List of Variables and Attributes----- Variable Type Len Pos Format Label custnum Num 3 6 Customer Number invnum Num 3 0 Invoice Number invprice Num 5 12 DOLLAR12.2 Invoice Unit Price invqty Num 3 9 Invoice Quantity - Units Sold manunum Num 3 3 Manufacturer Number prodnum Num 3 17 Product Number
Manufacturers CONTENTS Output -----Alphabetic List of Variables and Attributes----- Variable Type Len Pos Label manucity Char 20 25 Manufacturer City manuname Char 25 0 Manufacturer Name manunum Num 3 47 Manufacturer Number manustat Char 2 45 Manufacturer State
Products CONTENTS Output -----Alphabetic List of Variables and Attributes----- Variable Type Len Pos Format Label manunum Num 3 40 Manufacturer Number prodcost Num 5 43 DOLLAR9.2 Product Cost prodname Char 25 0 Product Name prodnum Num 3 48 Product Number prodtype Char 15 25 Product Type
Purchases CONTENTS Output -----Alphabetic List of Variables and Attributes----- Variable Type Len Pos Format custnum Num 4 0 item Char 10 8 unitcost Num 4 4 DOLLAR12.2 units Num 3 18
1.6.1. The Database Structure
The logical relationship between each table and the columns common to each appear below.
1.6.2. Sample Database Tables
The six tables (named above) represent a relational database that will be illustrated in the examples in this book. These tables are small enough to follow easily, but complex enough to illustrate the power of SQL. The data contained in each table appears below.
CUSTOMERS Table
custnum custname custcity 101 La Mesa Computer Land La Mesa 201 Vista Tech Center Vista 301 Coronado Internet Zone Coronado 401 La Jolla Computing La Jolla 501 Alpine Technical Center Alpine 601 Oceanside Computer Land Oceanside 701 San Diego Byte Store San Diego 801 Jamul Hardware & Software Jamul 901 Del Mar Tech Center Del Mar 1001 Lakeside Software Center Lakeside 1101 Bonsall Network Store Bonsall 1201 Rancho Santa Fe Tech Rancho Santa Fe 1301 Spring Valley Byte Center Spring Valley 1401 Poway Central Poway 1501 Valley Center Tech Center Valley Center 1601 Fairbanks Tech USA Fairbanks Ranch 1701 Blossom Valley Tech Blossom Valley 1801 Chula Vista Networks N = 18
INVENTORY Table
prodnum invenqty orddate invencst manunum 1110 20 09/01/2000 $45,000.00 111 1700 10 08/15/2000 $28,000.00 170 5001 5 08/15/2000 $1,000.00 500 5002 3 08/15/2000 $900.00 500 5003 10 08/15/2000 $2,000.00 500 5004 20 09/01/2000 $1,400.00 500 5001 2 09/01/2000 $1,200.00 600 N = 7
INVOICE Table
invnum manunum custnum invqty invprice prodnum 1001 500 201 5 $1,495.00 5001 1002 600 1301 2 $1,598.00 6001 1003 210 101 7 $245.00 2101 1004 111 501 3 $9,600.00 1110 1005 500 801 2 $798.00 5002 1006 500 901 4 $396.00 6000 1007 500 401 7 $23,100.00 1200 N = 7
MANUFACTURERS Table
manunum manuname manucity manustat 111 Cupid Computer Houston TX 210 KPL Enterprises San Diego CA 600 World Internet Corp Miami FL 120 Storage Devices Inc San Mateo CA 500 Global Software San Diego CA 700 San Diego PC Planet San Diego CA N = 6
PRODUCTS Table
prodnum prodname manunum prodtype prodcost 1110 Dream Machine 111 Workstation $3,200.00 1200 Business Machine 120 Workstation $3,300.00 1700 Travel Laptop 170 Laptop $3,400.00 2101 Analog Cell Phone 210 Phone $35.00 2102 Digital Cell Phone 210 Phone $175.00 2200 Office Phone 220 Phone $130.00 5001 Spreadsheet Software 500 Software $299.00 5002 Database Software 500 Software $399.00 5003 Wordprocessor Software 500 Software $299.00 5004 Graphics Software 500 Software $299.00 N=10
PURCHASES Table
custnum item units unitcost 1 Chair 1 $179.00 1 Pens 12 $0.89 1 Paper 4 $6.95 1 Stapler 1 $8.95 7 Mouse Pad 1 $11.79 7Pens 24 $1.59 13 Markers . $0.99 N=7
..................Content has been hidden....................
You can't read the all page of ebook, please click
here login for view all page.