.Suppose you have a small retail store and decide to create a database to track
ID: 3759170 • Letter: #
Question
.Suppose you have a small retail store and decide to create a database to track sales. You have information about recent sales that you want to use for testing the database. View all or part of the MySQL tutorial on Lynda.com to learn how to install and create a database in MySQL. If necessary, install MySQL on your computer. Then, create the tables for tracking the sales in the database shown below. Include all the constraints you consider necessary to maintain the integrity of the database. Then, for each named table, insert the listed data.
Explanation / Answer
1. Download the Mysql software
2. Run the installer
3. Fill the required information username and password
4. Wait till installation complete
5. After installation just browse the Mysql icon
CUSTOMERS (CUSTOMER_ID, NAME, ADDRESS, CURRENT BALANCE, CREDIT LIMIT, SALES REP ID)
INSERT INTO CUSTOMERS (CUSTOMER_ID, NAME, ADDRESS, CURRENT BALANCE, CREDIT LIMIT, SALES REP ID) VALUES ('124','iNDRA', '481 MUMBAI','1000', '5000','3');
SALES REPS (SALES_ID, NAME, ADDRESS, TOTAL COMMISSION, COMMISSION RATE)
INSERT INTO SALES REPS (SALES_ID, NAME, ADDRESS, TOTAL COMMISSION, COMMISSION RATE) VALUES ('3', 'ASHISH', '123 MAIN GRANT','4900','215.05');
ORDERS(ORDERS_ID, ORDER DATE, CUSTOMER, SHIPPING DATE)
INSERT INTO ORDERS(ORDERS_ID, ORDER DATE, CUSTOMER, SHIPPING DATE) VALUES ('12489', '02-JUL-11', '124','22-JUL-11');
ORDERITEMS (ORDER_ID, PART_ID, QUANTITY, PRICE)
INSERT INTO ORDERITEMS (ORDER_ID, PART_ID, QUANTITY, PRICE) VALUES ('12489',' in00110f','11','21.95');
PARTS (PART_ID, PART_DES, UNITS ON HAND, CLASS, WAREHOUSE_NUMBER, UNIT PRICE)
INSERT INTO PARTS (PART_ID, PART_DES, UNITS ON HAND, CLASS, WAREHOUSE_NUMBER, UNIT PRICE) VALUES ('IN00110f','IRON','104','HW','3','24.95');
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.