It/264 Appendix B

Only available on StudyMode
  • Download(s) : 134
  • Published : July 3, 2011
Open Document
Text Preview
Axia College Material
Appendix B

SQL Programming Assignment Sheet

Class:IT/264
Date:May 15, 2011
Assignment title:Retail Scenario, Part 1

Requirements:

Create a database for Aequitas Hardware Supply that will manage customers, orders, and inventory.

Solution summary:

Used SQL programming and CREATE TABLE command to create the tables titled Customer, Item, Order, and Order-Item. Identified the Primary Key for each table and set the necessary NOT NULL attributes.

SQL source:
Include your SQL source here.
CREATE TABLE CUSTOMER
(CUSTOMER_NUM CHAR(5) PRIMARY KEY,
LAST_NAME CHAR(15) NOT NULL,
FIRST_NAME CHAR(15) NOT NULL,
ADDRESS CHAR(15),
CITY CHAR(15),
STATE CHAR(2),
ZIP CHAR(5),
PHONE CHAR(10),
FAX CHAR(10),
EMAIL(30) ) ;

CREATE TABLE ITEM
(ITEM_NUM CHAR(5) PRIMARY KEY,
DESCRIPTION CHAR(30) NOT NULL,
QUANTITY CHAR(3),
UNIT COST DECIMAL(4,2),
REGULAR PRICE DECIMAL(4,2),
PROMOTIONAL PRICE DECIMAL(4,2) );

CREATE TABLE ORDER
(ORDER_NUM CHAR(5) PRIMARY KEY
CUSTOMER NUMBER CHAR(5) NOT NULL,
SALES PERSON NAME CHAR(15) NOT NULL,
TAX AMOUNT DECIMAL(4,2,),
TOTAL AMOUNT DECIMAL(4,2),
SHIPPING METHOD CHAR(15), ) ;

CREATE TABLE ORDER ITEM
(ORDER ITEM_NUMBER CHAR(5) PRIMARY KEY,
ORDER NUMER CHAR(5) NOT NULL,
ITEM DESCRIPTION CHAR(15) NOT NULL,
PRICE DECIMAL(4,2),
QUANTITY CHAR(5), ) ;

Output results:
Include the output here, which is usually in table form.
CUSTOMER
CUSTOMER NUMBERLAST NAMEFIRST NAMEADDRESSCITYSTATEZIP CODEPHONE FAX EMAIL

ITEM
ITEM NUMBERDESCRIPTIONQUANTITY ON HANDUNIT COSTREGULAR PRICEPROMOTIONAL PRICE

ORDER
ORDER NUMBERCUSTOMER NUMBERSALESPERSON NAMETAX AMOUNTTOTAL AMOUNTSHIPPING METHOD

ORDER-ITEM
ORDER ITEM NUMBERORDER NUMBERITEM NUMBERPRICEQUANTITY

Testing:
Include a description of the testing here.
tracking img