Question Details

[solution] » SET ECHO ON---- Author: >>---- IMPORTANT: use the names IC-1,

Brief item decscription

Step-by-step solution file


Item details:

SET ECHO ON---- Author: >>---- IMPORTANT: use the names IC-1,
More:

SET ECHO ON---- Author: >>---- IMPORTANT: use the names IC-1, IC-2, etc. as given below.-- ---------------------------------------------------------------------- The two DROP commands below are placed here for convenience in-- order to drop the tables if they exist. If the tables don't-- exist, you'll get an error - just ignore the error.--DROP TABLE Orders CASCADE CONSTRAINTS;DROP TABLE OrderLine CASCADE CONSTRAINTS;--CREATE TABLE Orders(orderNum INTEGER PRIMARY KEY,priority CHAR(10) NOT NULL,cost INTEGER NOT NULL,/*IC1: The priority is one of: high, medium, or low*/>>/*IC2: The cost of a high priority order is above 2000.*/>>/*IC3: The cost of a medium priority order is between 800 and 2200 (inclusive).*/>>/*IC4: The cost of a low priority order is less than 1000.*/>>);----CREATE TABLE OrderLine(orderNum INTEGER,lineNum INTEGER,item CHAR (10) NOT NULL,quantity INTEGER,PRIMARY KEY (orderNum, lineNum),/*IC5: Every order line must belong to an order in the Order table.Also: if an order is deleted then all its order lines must be deleted.IMPORTANT: DO NOT declare this IC as DEFERRABLE.*/>>);---- ------------------------------------------------------------------ TESTING THE SCHEMA-- ----------------------------------------------------------------INSERT INTO Orders VALUES (10, 'high', 2400);INSERT INTO Orders VALUES (20, 'high', 1900);INSERT INTO Orders VALUES (30, 'high', 2100); _hc-DDL.doc Page 3 of 3INSERT INTO Orders VALUES (40, 'medium', 700);INSERT INTO Orders VALUES (50, 'low', 1100);INSERT INTO Orders VALUES (60, 'low', 900);SELECT * from Orders;-- ----------------------------------------------------------------INSERT INTO OrderLine VALUES (10, 1, 'AAA', 200);INSERT INTO OrderLine VALUES (10, 2, 'BBB', 300);INSERT INTO OrderLine VALUES (60, 1, 'CCC', 5);INSERT INTO OrderLine VALUES (15, 1, 'AAA', 7);SELECT * FROM OrderLine;--DELETE FROM Orders WHERE orderNum = 10;SELECT * From Orders;SELECT * FROM OrderLine;--SET ECHO OFFSPOOL OFF

 







About this question:
STATUS
Answered
QUALITY
Approved
ANSWER RATING

This question was answered on: Feb 21, 2020

PRICE: $24

Solution~00065722527.zip (18.37 KB)

Buy this answer for only: $24

This attachment is locked

We have a ready expert answer for this paper which you can use for in-depth understanding, research editing or paraphrasing. You can buy it or order for a fresh, original and plagiarism-free copy (Deadline assured. Flexible pricing. TurnItIn Report provided)

Pay using PayPal (No PayPal account Required) or your credit card. All your purchases are securely protected by PayPal.
SiteLock

Need a similar solution fast, written anew from scratch? Place your own custom order

We have top-notch tutors who can help you with your essay at a reasonable cost and then you can simply use that essay as a template to build your own arguments. This we believe is a better way of understanding a problem and makes use of the efficiency of time of the student. New solution orders are original solutions and precise to your writing instruction requirements. Place a New Order using the button below.

Order Now