The information stored | Computer Science homework help

 

 

 

Ultimate Half I: Response Sheet

 

 

Query #:

Response

1

 

2

 

three

 

four

 

5

 

6

 

7

 

Eight

 

9

 

10

 

11

 

12

 

13

 

14

 

15

 

16

 

17

 

18

 

19

 

20

 

21

 

22

 

23

 

24

 

25

 

 

 

 

 

 

 

 

 

 

 

 

FINAL PART I

 

1.  The knowledge saved within the ____ is utilized by the DBMS for a restoration requirement triggered by a ROLLBACK assertion, a program’s irregular termination, or a system failure resembling a community discrepancy or a disk crash
A. 
knowledge dictionary
B. transaction log
C. metadata
D. rollback supervisor

2. Which of the next is an instance of misplaced replace? 
A. The system assigns the final aisle seat on a flight to John whereas Peter receives a window seat, though each indicated desire for an aisle seat
B. John and Peter obtain every a window seat as they each requested
C. John is initially assigned the final window seat, however this seat is afterward assigned to Peter
D. Not one of the above

three. Julia has a lock on the financial savings account and Invoice is making an attempt to carry out a conflicting motion on the info: 
A. Invoice's transaction is granted permission to carry out the specified motion
B. Invoice's transaction should wait till Julia has learn the financial savings account worth
C. Invoice's transaction should wait till Julia's lock is launched
D. Not one of the above

four. Julia has a shared lock on the financial savings account and Invoice is making an attempt to carry out an motion requesting a shared lock on the identical knowledge: 
A. Invoice's transaction should wait till Julia has learn the financial savings account worth
B. Invoice's transaction should wait till Julia's lock is launched
C. Invoice's transaction is granted permission to carry out the specified motion
D. Not one of the above

5. Julia has an unique lock on the financial savings account and Invoice is making an attempt to carry out an motion requesting a shared lock on the identical knowledge: 
A. Invoice's transaction should wait till Julia's lock is launched
B. Invoice's transaction is granted permission to carry out the specified motion
C. Invoice's transaction should wait till Julia has learn the financial savings account worth
D. Not one of the above

6. Which of the next will trigger a impasse? 
A. Transaction T1 requests an unique lock on knowledge A concurrently transaction T2
B. Transaction T1 locations an unique lock on knowledge A, then transaction T2 requests a shared lock on knowledge A
C. Transaction T1 and T2 modify knowledge A with none lock
D. Transaction T1 locations an unique lock on knowledge A, then requests one on knowledge B. Concurrently, transaction T2 locations an unique lock on knowledge B, then requests one on knowledge A

 

7. Take into account a transaction that updates every of the 100 workers' salaries in a desk (there may be one row per worker) underneath the fast replace mode. The transaction terminates abnormally after 10 rows have been up to date within the database (and the conventional operations have taken place on the log). What ought to the restoration process carry out to verify the transaction completes as desired? 
 
A. Redo
B. Redo adopted by execution of the transaction once more
C. Undo
D. Undo adopted by execution of the transaction once more

 

 

Eight. The _______________  question will output the desk contents when the worth of the character discipline P_CODE is alphabetically lower than 1558-QW1.

A. SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE

     FROM PRODUCT

            WHERE P_CODE <'1558-QW1';

B. SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE

     FROM PRODUCT

            WHERE P_CODE = [1558-QW1]

C. SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE

     FROM PRODUCT

            WHERE P_CODE = (1558-QW1)

D. SELECT P_CODE, P_DESCRIPT, P_QOH, P_MIN, P_PRICE

     FROM PRODUCT

            WHERE P_CODE =

 

 

9. The first goal of database design is __________________.

A. To create essentially the most environment friendly database attainable

B. To create the quickest queries

C. To create full, normalized, nonredundant, and totally built-in conceptual, logical, and bodily database fashions

D. To have the ability to add knowledge shortly

 

10. The command to hitch the P_DESCRIPT and P_PRICE fields from the PRODUCT desk and the V_NAME, V_AREACODE, V_PHONE, and V_CONTACT fields from the VENDOR desk the place the worth of V_CODE match is ________________.

 

A. SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE

      FROM PRODUCT, VENDOR

              WHERE PRODUCT.V_CODE <> VENDOR.V_CODE;                

B. SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE

      FROM PRODUCT, VENDOR

              WHERE PRODUCT.V_CODE = VENDOR.V_CODE; 

C. SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE

      FROM PRODUCT, VENDOR

              WHERE PRODUCT.V_CODE <= VENDOR.V_CODE;

D. SELECT P_DESCRIPT, P_PRICE, V_NAME, V_CONTACT, V_AREACODE, V_PHONE

      FROM PRODUCT, VENDOR

              WHERE PRODUCT.V_CODE => VENDOR.V_CODE;

 

 

11. Person necessities, current system analysis, and logical system design are a part of the __________ section of the SDLC.

A. planning      

B. evaluation

C. detailed programs design       

D. Implementation

 

 

12. The conceptual design steps determines end-user views, outputs, and transaction-processing necessities are _______________________.

A. Database evaluation and necessities

B. Entity relationship modeling and normalization

C. Knowledge mannequin verification

D. Distributed database design

 

13. ___________________ is a drawback of a DDBMS.

A. Knowledge is situated close to the “best demand” website

B. Progress facilitation

C. Hazard of a single-point failure

D. Lack of requirements

 

14. A constant database is _____________________.

A. One wherein all tables have international keys

B. One wherein all knowledge integrity constraints are happy

C. One wherein all tables are normalized

D. One wherein all SQL statements solely replace one desk at a time

 

15. The ____ comprises enterprise knowledge extracted from the operational database and from exterior knowledge sources.

A. Knowledge retailer   

B. Knowledge visualization instrument

C. Knowledge dictionary       

D. ETL instrument

 

16. The ________________  command is used to listing a novel worth for V_CODE, the place the listing will produce solely a listing of these values which can be completely different from each other.

A. SELECT ONLY V_CODE

       FROM PRODUCT;

B. SELECT UNIQUE V_CODE

       FROM PRODUCT;

C. SELECT DIFFERENT V_CODE

       FROM PRODUCT;

D. SELECT DISTINCT V_CODE

       FROM PRODUCT;

 

17. All transactions should show _____________________.

A. atomicity, serializability, and sturdiness

B. sturdiness and isolation

C. serializability, sturdiness, and isolation

D. atomicity, sturdiness, serializability, and isolation

 

 

18. The ANSI has outlined requirements that govern SQL database transactions.  Transaction assist is offered by two SQL statements: ____________________ and ROLLBACK.

A. RETRIEVE

B. ASSIGN

C. UPDATE   

D. COMMIT

 

19. ____________ question optimization takes place at compilation time.

A. Static          

B. Dynamic

C. Computerized   

D. Guide

 

 

Use the next tables for a automotive rental database to reply questions 20-25:

 

CUSTOMER
   
 In desk CUSTOMER, CID is the first key (Buyer ID).
 
 RENTALS
   
Within the desk RENTALS, RTN gives the rental quantity (the first key), CID is the shopper's distinctive id, PICKUP is town the place the automotive was picked up, and Return is town the place the automotive was returned.
 
 RENTCOST
   
 RENTCOST exhibits the bottom price of renting a given MAKE for at some point.
 
 

CITYADJ
   
If the return metropolis of desk RENTALS is the one listed in desk CITYADJ, the price of the rental is multiplied by FACTOR and by DAYS proven in desk RENTLENGTH beneath.
 
 RENTLENGTH
   
 RENTLENGTH exhibits the variety of days for the rental quantity (RTN) proven in desk RENTALS. In a database utilized in actuality, this desk could be merged with the RENTALS desk.

 

20. SELECT DISTINCT CID, CNAME
FROM CUSTOMER
WHERE CID IN
(SELECT CID FROM RENTALS WHERE MAKE IN ('FORD', 'TOYOTA'))
The CNAMEs proven by the execution of this question are: 
A. BLACK
B. BLACK, JONES
C. BLACK, JONES, MARTIN
D. BLACK, JONES, MARTIN, VERNON

 

 

21. SELECT DISTINCT CUSTOMER.CID, CNAME
FROM CUSTOMER, RENTALS, RENTCOST
WHERE CUSTOMER.CID = RENTALS.CID
AND RENTALS.MAKE = RENTCOST.MAKE AND NOT EXISTS
(SELECT * FROM RENTALS R, RENTCOST C
WHERE R.MAKE = C.MAKE
AND RENTALS.CID = R.CID
AND RENTCOST.COST <> C.COST)
The which means of this question is:  
A. Record all prospects with a couple of automotive make rented
B. Record all prospects with a number of leases for which the price of every automotive make rented is similar
C. Record all prospects who've solely rented one make
D. Not one of the above

22. SELECT MAKE
FROM RENTALS, CUSTOMER
WHERE RENTALS.CID = CUSTOMER.CID AND RESID_CITY = 'HEMET'
GROUP BY MAKE
HAVING COUNT (DISTINCT RENTALS.CID) =
(SELECT COUNT
FROM CUSTOMER
WHERE RESID_CITY = 'HEMET')
The execution of this question produces the next variety of rows:  
A. zero
B. 1
C. 2
D. three

23. SELECT MAKE
FROM RENTALS, CUSTOMER
WHERE RENTALS.CID = CUSTOMER.CID AND RESID_CITY = 'HEMET'
GROUP BY MAKE
HAVING COUNT (DISTINCT RENTALS.CID) =
(SELECT COUNT
FROM CUSTOMER
WHERE RESID_CITY = 'HEMET')
The which means of this question is the next:  
A. Record all makes of vehicles rented to prospects residing in Hemet
B. Record all makes of vehicles rented to no less than one buyer residing in Hemet
C. Record all makes of vehicles rented to all prospects residing in Hemet
D. Not one of the above

 24. SELECT CID, CNAME FROM CUSTOMER
WHERE zero =
(SELECT COUNT
FROM RENTALS
WHERE CUSTOMER.CID = RENTALS.CID)
What's the interpretation of this question?  
A. Record the shoppers who shouldn't have leases
B. Record the shoppers who've one rental
C. Record the shoppers who've zero or extra leases
D. Record the shoppers who've 1 or extra leases

 

25. SELECT CNAME, DATE_OUT, RTN
FROM CUSTOMER, RENTALS
WHERE CUSTOMER.CID = RENTALS.CID AND BIRTHPLACE IN ('ERIE', 'CARY') AND EXISTS
(SELECT * FROM RENTCOST
WHERE COST < 40 AND RENTALS.MAKE= RENTCOST.MAKE)
The CNAMEs proven by the execution of this question are:  
A. GREEN
B. GREEN, BLACK, SIMON
C. SIMON
D. GREEN, SIMON

 

================

DBST 651

 

 FINAL PART II

 

 

 

Title:                                                                 Date:

 

Query 1:(20 Factors)

Use the DBST651_final_Part2_q1.sql script hooked up to reply the next SQL issues:

Create SQL statements for the next eventualities. Your response ought to embody SQL assertion, output and another assumptions you could have made to reach on the resolution.

a. For Colorado prospects compute the typical quantity of their orders and the variety of orders positioned. The consequence ought to embody the shopper quantity, buyer final identify, common order quantity and the variety of orders positioned.

b. For Colorado prospects compute the variety of distinctive merchandise ordered. If a product is bought on a number of orders, it ought to be counted just one time. The consequence ought to embody buyer quantity, buyer final identify and the variety of distinctive merchandise ordered.

c. For every worker with a fee lower than zero.04, compute the variety of orders taken and the typical variety of merchandise per order. The outcomes ought to embody the worker quantity, worker final identify, variety of orders taken and the typical variety of merchandise per order.

d. For every Connex product compute the variety of distinctive prospects who ordered the product in Jan 2007. The outcomes ought to embody the product quantity, product identify and the variety of distinctive prospects.

Query 2:

Please present solutions to issues 1-10 in Chapter 7 of Coronel e-book web page 295-296. (10th version web page 282-284)  (15 Factors)

 

Query three:

Please present solutions to downside 1a-1d in Chapter 10 of Coronel e-book web page 483. (10th version web page 464)  (15 Factors)

 

=============================

 

 

 

DROP TABLE ordline cascade constraints;
Drop TABLE OrderTBL cascade constraints;
DROP TABLE Buyer cascade constraints;
dROP TABLE Worker cascade constraints;
DROP TABLE Product cascade constraints;

CREATE TABLE Product
(     ProdNo              CHAR(Eight),
      ProdName     VARCHAR2(50) CONSTRAINT ProdNameRequired NOT NULL,
    ProdMfg             VARCHAR2(20) CONSTRAINT ProdMfgRequired NOT NULL,
    ProdQOH             INTEGER,
    ProdPrice        DECIMAL(12,2),
        ProdNextShipDate DATE,
 CONSTRAINT PKProduct PRIMARY KEY (ProdNo)  );

INSERT INTO product
    (ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
    VALUES ('P0036566','17 inch Shade Monitor','ColorMeg, Inc.',12,'20-Feb-2007',169.00);

INSERT INTO product
    (ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
    VALUES ('P0036577','19 inch Shade Monitor','ColorMeg, Inc.',10,'20-Feb-2007',319.00);

INSERT INTO product
    (ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
    VALUES ('P1114590','R3000 Shade Laser Printer','Connex',5,'22-Jan-2007',699.00);

INSERT INTO product
    (ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
    VALUES ('P1412138','10 Foot Printer Cable','Ethlite',100,'',12.00);

INSERT INTO product
    (ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
    VALUES ('P1445671','Eight-Outlet Surge Protector','Intersafe',33,'',14.99);

INSERT INTO product
    (ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
    VALUES ('P1556678','CVP Ink Jet Shade Printer','Connex',Eight, '22-Jan-2007',99.00);

INSERT INTO product
    (ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
    VALUES ('P3455443','Shade Ink Jet Cartridge','Connex',24,'22-Jan-2007',38.00);

INSERT INTO product
    (ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
    VALUES ('P4200344','36-Bit Shade Scanner','UV Parts',16,'29-Jan-2007',199.99);

INSERT INTO product
    (ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
    VALUES ('P6677900','Black Ink Jet Cartridge','Connex',44,'',25.69);

INSERT INTO product
    (ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
    VALUES ('P9995676','Battery Again-up System','Cybercx',12,'1-Feb-2007',89.00);

CREATE TABLE Worker
(     EmpNo          CHAR(Eight),
      EmpFirstName    VARCHAR2(20) CONSTRAINT EmpFirstNameRequired NOT NULL,
    EmpLastName     VARCHAR2(30) CONSTRAINT EmpLastNameRequired NOT NULL,
    EmpPhone        CHAR(15),
    EmpEMail        VARCHAR(50) CONSTRAINT EmpEMailRequired NOT NULL,
       SupEmpNo     CHAR(Eight),
        EmpCommRate    DECIMAL(three,three),
CONSTRAINT PKEmployee PRIMARY KEY (EmpNo),
CONSTRAINT UniqueEMail UNIQUE(EmpEMail),
CONSTRAINT FKSupEmpNo FOREIGN KEY (SupEmpNo) REFERENCES Worker )
;

INSERT INTO worker (EmpNo, EmpFirstName, EmpLastName, EmpPhone, EmpEMail,
     SupEmpNo, EmpCommRate)
    VALUES ('E9884325','Thomas','Johnson','(303) 556-9987','[email protected]','',zero.05);

INSERT INTO worker
    (EmpNo, EmpFirstName, EmpLastName, EmpPhone, EmpEMail,
     SupEmpNo, EmpCommRate)
    VALUES ('E8843211','Amy','Tang','(303) 556-4321','[email protected]','E9884325',zero.04);

INSERT INTO worker
    (EmpNo, EmpFirstName, EmpLastName, EmpPhone, EmpEMail,
     SupEmpNo, EmpCommRate)
    VALUES ('E9345771','Colin','White','(303) 221-4453','[email protected]','E9884325',zero.04);

INSERT INTO worker
    (EmpNo, EmpFirstName, EmpLastName, EmpPhone, EmpEMail,
     SupEmpNo, EmpCommRate)
    VALUES ('E1329594','Landi','Santos','(303) 789-1234','[email protected]','E8843211',zero.02);

INSERT INTO worker
    (EmpNo, EmpFirstName, EmpLastName, EmpPhone, EmpEMail,
     SupEmpNo, EmpCommRate)
    VALUES ('E8544399','Joe','Jenkins','(303) 221-9875','[email protected]','E8843211',zero.02);

INSERT INTO worker
    (EmpNo, EmpFirstName, EmpLastName, EmpPhone, EmpEMail,
     SupEmpNo, EmpCommRate)
    VALUES ('E9954302','Mary','Hill','(303) 556-9871','[email protected]','E8843211',zero.02);

INSERT INTO worker
    (EmpNo, EmpFirstName, EmpLastName, EmpPhone, EmpEMail,
     SupEmpNo)
    VALUES ('E9973110','Theresa','Beck','(720) 320-2234','[email protected]','E9884325');

CREATE TABLE Buyer
(     CustNo             CHAR(Eight),
        CustFirstName    VARCHAR2(20) CONSTRAINT CustFirstNameRequired NOT NULL,
        CustLastName     VARCHAR2(30) CONSTRAINT CustLastNameRequired NOT NULL,
    CustStreet    VARCHAR2(50),
    CustCity    VARCHAR2(30),
       CustState    CHAR(2),
    CustZip        CHAR(10),
    CustBal        DECIMAL(12,2) DEFAULT zero,
 CONSTRAINT PKCustomer PRIMARY KEY (CustNo)  );

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C0954327','Sheri','Gordon','336 Hill St.','Littleton','CO','80129-5543',230.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C1010398','Jim','Glussman','1432 E. Ravenna','Denver','CO','80111-0033',200.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C2388597','Beth','Taylor','2396 Rafter Rd','Seattle','WA','98103-1121',500.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C3340959','Betty','Clever','4334 153rd NW','Seattle','WA','98178-3311',200.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C3499503','Bob','Mann','1190 Lorraine Cir.','Monroe','WA','98013-1095',zero.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C8543321','Ron','Thompson','789 122nd St.','Renton','WA','98666-1289',85.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C8574932','Wally','Jones','411 Webber Ave.','Seattle','WA','98105-1093',1500.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C8654390','Sweet','Kendall','456 Pine St.','Seattle','WA','98105-3345',50.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C9128574','Jerry','Wyatt','16212 123rd Ct.','Denver','CO','80222-0022',100.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C9403348','Mike','Boren','642 Crest Ave.','Englewood','CO','80113-5431',zero.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C9432910','Larry','Kinds','9825 S. Crest Lane','Bellevue','WA','98104-2211',250.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C9543029','Sharon','Johnson','1223 Meyer Method','Fife','WA','98222-1123',856.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C9549302','Todd','Hayes','1400 NW 88th','Lynnwood','WA','98036-2244',zero.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C9857432','Homer','Wells','123 Major St.','Seattle','WA','98105-4322',500.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C9865874','Mary','Hill','206 McCaffrey','Littleton','CO','80129-5543',150.00);

INSERT INTO buyer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES('C9943201','Harry','Sanders','1280 S. Hill Rd.','Fife','WA','98222-2258',1000.00);

CREATE TABLE OrderTbl
(     OrdNo        CHAR(Eight),
      OrdDate       DATE    CONSTRAINT OrdDateRequired NOT NULL,
    CustNo       CHAR(Eight) CONSTRAINT CustNoRequired NOT NULL,
        EmpNo       CHAR(Eight),
        OrdName    VARCHAR2(50),
        OrdStreet  VARCHAR2(50),
        OrdCity    VARCHAR2(30),
        OrdState   CHAR(2),
        OrdZip     CHAR(10),
CONSTRAINT PKOrderTbl PRIMARY KEY (OrdNo),
CONSTRAINT FKCustNo FOREIGN KEY (CustNo) REFERENCES Buyer,
CONSTRAINT FKEmpNo FOREIGN KEY (EmpNo) REFERENCES Worker  );

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O1116324','23-Jan-2007','C0954327','E8544399','Sheri Gordon','336 Hill St.','Littleton','CO','80129-5543');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O1231231','23-Jan-2007','C9432910','E9954302','Larry Kinds','9825 S. Crest Lane','Bellevue','WA','98104-2211');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O1241518','10-Feb-2007','C9549302','','Todd Hayes','1400 NW 88th','Lynnwood','WA','98036-2244');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O1455122','9-Jan-2007','C8574932','E9345771','Wally Jones','411 Webber Ave.','Seattle','WA','98105-1093');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O1579999','5-Jan-2007','C9543029','E8544399','Tom Johnson','1632 Ocean Dr.','Des Moines','WA','98222-1123');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O1615141','23-Jan-2007','C8654390','E8544399','Sweet Kendall','456 Pine St.','Seattle','WA','98105-3345');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O1656777','11-Feb-2007','C8543321','','Ron Thompson','789 122nd St.','Renton','WA','98666-1289');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O2233457','12-Jan-2007','C2388597','E9884325','Beth Taylor','2396 Rafter Rd','Seattle','WA','98103-1121');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O2334661','14-Jan-2007','C0954327','E1329594','Mrs. Ruth Gordon','233 S. 166th','Seattle','WA','98011');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O3252629','23-Jan-2007','C9403348','E9954302','Mike Boren','642 Crest Ave.','Englewood','CO','80113-5431');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O3331222','13-Jan-2007','C1010398','','Jim Glussman','1432 E. Ravenna','Denver','CO','80111-0033');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O3377543','15-Jan-2007','C9128574','E8843211','Jerry Wyatt','16212 123rd Ct.','Denver','CO','80222-0022');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O4714645','11-Jan-2007','C2388597','E1329594','Beth Taylor','2396 Rafter Rd','Seattle','WA','98103-1121');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O5511365','22-Jan-2007','C3340959','E9884325','Betty White','4334 153rd NW','Seattle','WA','98178-3311');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O6565656','20-Jan-2007','C9865874','E8843211','Mr. Jack Sibley','166 E. 344th','Renton','WA','98006-5543');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O7847172','23-Jan-2007','C9943201','','Harry Sanders','1280 S. Hill Rd.','Fife','WA','98222-2258');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O7959898','19-Feb-2007','C8543321','E8544399','Ron Thompson','789 122nd St.','Renton','WA','98666-1289');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O7989497','16-Jan-2007','C3499503','E9345771','Bob Mann','1190 Lorraine Cir.','Monroe','WA','98013-1095');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O8979495','23-Jan-2007','C9865874','','HelenSibley','206 McCaffrey','Renton','WA','98006-5543');

INSERT INTO ordertbl
    (OrdNo, OrdDate, CustNo, EmpNo, OrdName, OrdStreet, OrdCity,
     OrdState, OrdZip)
    VALUES ('O9919699','11-Feb-2007','C9857432','E9954302','Homer Wells','123 Major St.','Seattle','WA','98105-4322');

CREATE TABLE OrdLine
(     OrdNo     CHAR(Eight),
      ProdNo    CHAR(Eight),
    Qty        INTEGER DEFAULT 1,
CONSTRAINT PKOrdLine PRIMARY KEY (OrdNo, ProdNo),
CONSTRAINT FKOrdNo FOREIGN KEY (OrdNo) REFERENCES OrderTbl
  ON DELETE CASCADE,
CONSTRAINT FKProdNo FOREIGN KEY (ProdNo) REFERENCES Product  );

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O1116324','P1445671',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O1231231','P0036566',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O1231231','P1445671',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O1241518','P0036577',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O1455122','P4200344',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O1579999','P1556678',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O1579999','P6677900',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O1579999','P9995676',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O1615141','P0036566',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O1615141','P1445671',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O1615141','P4200344',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O1656777','P1445671',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O1656777','P1556678',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O2233457','P0036577',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O2233457','P1445671',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O2334661','P0036566',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O2334661','P1412138',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O2334661','P1556678',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O3252629','P4200344',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O3252629','P9995676',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O3331222','P1412138',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O3331222','P1556678',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O3331222','P3455443',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O3377543','P1445671',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O3377543','P9995676',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O4714645','P0036566',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O4714645','P9995676',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O5511365','P1412138',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O5511365','P1445671',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O5511365','P1556678',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O5511365','P3455443',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O5511365','P6677900',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O6565656','P0036566',10);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O7847172','P1556678',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O7847172','P6677900',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O7959898','P1412138',5);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O7959898','P1556678',5);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O7959898','P3455443',5);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O7959898','P6677900',5);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O7989497','P1114590',2);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O7989497','P1412138',2);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O7989497','P1445671',three);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O8979495','P1114590',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O8979495','P1412138',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O8979495','P1445671',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O9919699','P0036577',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O9919699','P1114590',1);

INSERT INTO ordline
    (OrdNo, ProdNo, Qty)
    VALUES('O9919699','P4200344',1);

commit;