Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Build the MT tables and associated data in your Project/Exam schema using the MT script file. The script creates 4 tables and populates each table

Build the MT tables and associated data in your Project/Exam schema using the MT script file. The script creates 4 tables and populates each table with associated data. Verify your tables and data prior to moving forward.

  • MT_Customer 4 columns/fields and 10 records
  • MT_Items 3 columns/fields and 10 records
  • MT_Order_Details - 3 columns/fields and 13 records
  • MT_Orders - 5 columns/fields and 11 records
  • Create table MT_Customer ( CUSTOMER_ID VARCHAR2(20), CUSTOMER_FNAME VARCHAR2(20), CUSTOMER_LNAME VARCHAR2(20), CUSTOMER_CITY VARCHAR2(20), CONSTRAINT pk_MTCustomerID PRIMARY KEY(CUSTOMER_ID) ); INSERT INTO "MT_CUSTOMER" (CUSTOMER_ID, CUSTOMER_FNAME, CUSTOMER_LNAME, CUSTOMER_CITY) VALUES ('3002', 'Nick', 'Rimando', 'New York'); INSERT INTO "MT_CUSTOMER" (CUSTOMER_ID, CUSTOMER_FNAME, CUSTOMER_LNAME, CUSTOMER_CITY) VALUES ('3005', 'Graham', 'Zusi', 'San Diego'); INSERT INTO "MT_CUSTOMER" (CUSTOMER_ID, CUSTOMER_FNAME, CUSTOMER_LNAME, CUSTOMER_CITY) VALUES ('3001', 'Brad', 'Guzan', 'London'); INSERT INTO "MT_CUSTOMER" (CUSTOMER_ID, CUSTOMER_FNAME, CUSTOMER_LNAME, CUSTOMER_CITY) VALUES ('3004', 'Fabian', 'Johns', 'Paris' ); INSERT INTO "MT_CUSTOMER" (CUSTOMER_ID, CUSTOMER_FNAME, CUSTOMER_LNAME, CUSTOMER_CITY) VALUES ('3007', 'Brad', 'Davis', 'New York'); INSERT INTO "MT_CUSTOMER" (CUSTOMER_ID, CUSTOMER_FNAME, CUSTOMER_LNAME, CUSTOMER_CITY) VALUES ('3009', 'Geoff', 'Camero', 'Berlin'); INSERT INTO "MT_CUSTOMER" (CUSTOMER_ID, CUSTOMER_FNAME, CUSTOMER_LNAME, CUSTOMER_CITY) VALUES ('3008', 'Julian', 'Green', 'London'); INSERT INTO "MT_CUSTOMER" (CUSTOMER_ID, CUSTOMER_FNAME, CUSTOMER_LNAME, CUSTOMER_CITY) VALUES ('3003', 'Jozy', 'Altidor', 'San Francisco'); INSERT INTO "MT_CUSTOMER" (CUSTOMER_ID, CUSTOMER_FNAME, CUSTOMER_LNAME, CUSTOMER_CITY) VALUES ('3020', 'Jon', 'Smith', 'Silver Spring'); INSERT INTO "MT_CUSTOMER" (CUSTOMER_ID, CUSTOMER_FNAME, CUSTOMER_LNAME, CUSTOMER_CITY) VALUES ('3021', 'Susie', 'Jones', 'Palo Alto'); Create table MT_Orders ( Order_ID VARCHAR2(20), order_amount Number, ORDER_DATE Date, CUSTOMER_ID VARCHAR2(20), SALES_ID VARCHAR2(20), CONSTRAINT pk_MTORDERID PRIMARY KEY(ORDER_ID) ); INSERT INTO "MT_ORDERS" (ORDER_ID, ORDER_AMOUNT, ORDER_DATE, CUSTOMER_ID, SALES_ID) VALUES ('70001', '150.5', TO_DATE('2012-10-05 00:00:00', 'YYYY-MM-DD HH24:MI:SS'), '3005', '5002'); INSERT INTO "MT_ORDERS" (ORDER_ID, ORDER_AMOUNT, ORDER_DATE, CUSTOMER_ID, SALES_ID) VALUES ('70009', '270.65', TO_DATE('2012-09-10 00:00:00', 'YYYY-MM-DD HH24:MI:SS'), '3001', '5005'); INSERT INTO "MT_ORDERS" (ORDER_ID, ORDER_AMOUNT, ORDER_DATE, CUSTOMER_ID, SALES_ID) VALUES ('70002', '65.26', TO_DATE('2012-10-09 00:00:00', 'YYYY-MM-DD HH24:MI:SS'), '3002', '5001'); INSERT INTO "MT_ORDERS" (ORDER_ID, ORDER_AMOUNT, ORDER_DATE, CUSTOMER_ID, SALES_ID) VALUES ('70004', '110.5', TO_DATE('2012-08-17 22:34:03', 'YYYY-MM-DD HH24:MI:SS'), '3009', '5003'); INSERT INTO "MT_ORDERS" (ORDER_ID, ORDER_AMOUNT, ORDER_DATE, CUSTOMER_ID, SALES_ID) VALUES ('70007', '948.5', TO_DATE('2012-09-10 00:00:00', 'YYYY-MM-DD HH24:MI:SS'), '3005', '5002'); INSERT INTO "MT_ORDERS" (ORDER_ID, ORDER_AMOUNT, ORDER_DATE, CUSTOMER_ID, SALES_ID) VALUES ('70005', '22400.6', TO_DATE('2012-07-27 22:34:33', 'YYYY-MM-DD HH24:MI:SS'), '3007', '5001'); INSERT INTO "MT_ORDERS" (ORDER_ID, ORDER_AMOUNT, ORDER_DATE, CUSTOMER_ID, SALES_ID) VALUES ('70008', '5760', TO_DATE('2012-09-10 22:34:46', 'YYYY-MM-DD HH24:MI:SS'), '3002', '5001'); INSERT INTO "MT_ORDERS" (ORDER_ID, ORDER_AMOUNT, ORDER_DATE, CUSTOMER_ID, SALES_ID) VALUES ('70010', '1983.43', TO_DATE('2011-10-10 00:00:00', 'YYYY-MM-DD HH24:MI:SS'), '3003', '5006'); INSERT INTO "MT_ORDERS" (ORDER_ID, ORDER_AMOUNT, ORDER_DATE, CUSTOMER_ID, SALES_ID) VALUES ('70003', '2480.4', TO_DATE('2012-10-10 00:00:00', 'YYYY-MM-DD HH24:MI:SS'), '3009', '5003'); INSERT INTO "MT_ORDERS" (ORDER_ID, ORDER_AMOUNT, ORDER_DATE, CUSTOMER_ID, SALES_ID) VALUES ('70012', '250.45', TO_DATE('2012-06-27 22:35:03', 'YYYY-MM-DD HH24:MI:SS'), '3008', '5002'); INSERT INTO "MT_ORDERS" (ORDER_ID, ORDER_AMOUNT, ORDER_DATE, CUSTOMER_ID, SALES_ID) VALUES ('70011', '75.29', TO_DATE('2012-08-17 22:35:18', 'YYYY-MM-DD HH24:MI:SS'), '3003', '5007'); Create table MT_ORDER_DETAILS( Order_ID VARCHAR2(20), ITEM_ID INT, QUANTITY NUMBER, CONSTRAINT pk_MTORDERDETAILSID PRIMARY KEY(ORDER_ID, ITEM_ID) ); INSERT INTO "MT_ORDER_DETAILS" (ORDER_ID, ITEM_ID, QUANTITY) VALUES ('70001', '100', '1'); INSERT INTO "MT_ORDER_DETAILS" (ORDER_ID, ITEM_ID, QUANTITY) VALUES ('70002', '300', '55'); INSERT INTO "MT_ORDER_DETAILS" (ORDER_ID, ITEM_ID, QUANTITY) VALUES ('70003', '500', '2'); INSERT INTO "MT_ORDER_DETAILS" (ORDER_ID, ITEM_ID, QUANTITY) VALUES ('70001', '500', '63'); INSERT INTO "MT_ORDER_DETAILS" (ORDER_ID, ITEM_ID, QUANTITY) VALUES ('70004', '200', '8'); INSERT INTO "MT_ORDER_DETAILS" (ORDER_ID, ITEM_ID, QUANTITY) VALUES ('70005', '600', '4'); INSERT INTO "MT_ORDER_DETAILS" (ORDER_ID, ITEM_ID, QUANTITY) VALUES ('70007', '400', '99'); INSERT INTO "MT_ORDER_DETAILS" (ORDER_ID, ITEM_ID, QUANTITY) VALUES ('70007', '300', '50'); INSERT INTO "MT_ORDER_DETAILS" (ORDER_ID, ITEM_ID, QUANTITY) VALUES ('70008', '800', '75'); INSERT INTO "MT_ORDER_DETAILS" (ORDER_ID, ITEM_ID, QUANTITY) VALUES ('70009', '800', '60'); INSERT INTO "MT_ORDER_DETAILS" (ORDER_ID, ITEM_ID, QUANTITY) VALUES ('70010', '1000', '23'); INSERT INTO "MT_ORDER_DETAILS" (ORDER_ID, ITEM_ID, QUANTITY) VALUES ('70011', '400', '5'); INSERT INTO "MT_ORDER_DETAILS" (ORDER_ID, ITEM_ID, QUANTITY) VALUES ('70012', '500', '3'); Create table MT_ITEMS ( ITEM_ID VARCHAR2(20), PROD_DESC VARCHAR2(20), PROD_Price Number, CONSTRAINT pk_MTITEMID PRIMARY KEY(ITEM_ID) ); INSERT INTO "MT_ITEMS" (ITEM_ID, PROD_DESC, PROD_PRICE) VALUES ('100', 'Softball', '25.25'); INSERT INTO "MT_ITEMS" (ITEM_ID, PROD_DESC, PROD_PRICE) VALUES ('200', 'Stickball', '15.35'); INSERT INTO "MT_ITEMS" (ITEM_ID, PROD_DESC, PROD_PRICE) VALUES ('300', 'Paddleball', '20.55'); INSERT INTO "MT_ITEMS" (ITEM_ID, PROD_DESC, PROD_PRICE) VALUES ('400', 'Basketball', '55.65'); INSERT INTO "MT_ITEMS" (ITEM_ID, PROD_DESC, PROD_PRICE) VALUES ('500', 'Baseball', '30.5'); INSERT INTO "MT_ITEMS" (ITEM_ID, PROD_DESC, PROD_PRICE) VALUES ('600', 'Football', '46.75'); INSERT INTO "MT_ITEMS" (ITEM_ID, PROD_DESC, PROD_PRICE) VALUES ('700', 'Bowling ball', '25.89'); INSERT INTO "MT_ITEMS" (ITEM_ID, PROD_DESC, PROD_PRICE) VALUES ('800', 'Tennis ball', '330.5'); INSERT INTO "MT_ITEMS" (ITEM_ID, PROD_DESC, PROD_PRICE) VALUES ('900', 'Volley ball', '7.51'); INSERT INTO "MT_ITEMS" (ITEM_ID, PROD_DESC, PROD_PRICE) VALUES ('1000', 'Golf ball', '33.56') ;

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

101 Database Exercises Text Workbook

Authors: McGraw-Hill

2nd Edition

0028007484, 978-0028007489

More Books

Students also viewed these Databases questions

Question

a. Describe the encounter. What made it intercultural?

Answered: 1 week ago

Question

3. Write a policy statement to address these issues.

Answered: 1 week ago