The information stored | Computer Science homework help

 

 

 

Save your time - order a paper!

Get your paper written from scratch within the tight deadline. Our service is a reliable solution to all your troubles. Place an order on any task and we will take care of it. You won’t have to worry about the quality and deadlines

Order Paper Now

Final Part I: Response Sheet

 

 

Question #:

Response

1

 

2

 

3

 

4

 

5

 

6

 

7

 

8

 

9

 

10

 

11

 

12

 

13

 

14

 

15

 

16

 

17

 

18

 

19

 

20

 

21

 

22

 

23

 

24

 

25

 

 

 

 

 

 

 

 

 

 

 

 

FINAL PART I

 

1.  The information stored in the ____ is used by the DBMS for a recovery requirement triggered by a ROLLBACK statement, a program’s abnormal termination, or a system failure such as a network discrepancy or a disk crash
A. 
data dictionary
B. transaction log
C. metadata
D. rollback manager

2. Which of the following is an example of lost update? 
A. The system assigns the last aisle seat on a flight to John whereas Peter receives a window seat, although both indicated preference for an aisle seat
B. John and Peter receive each a window seat as they both requested
C. John is initially assigned the last window seat, but this seat is later on assigned to Peter
D. None of the above

3. Julia has a lock on the savings account and Bill is trying to perform a conflicting action on the data: 
A. Bill’s transaction is granted permission to perform the desired action
B. Bill’s transaction must wait until Julia has read the savings account value
C. Bill’s transaction must wait until Julia’s lock is released
D. None of the above

4. Julia has a shared lock on the savings account and Bill is trying to perform an action requesting a shared lock on the same data: 
A. Bill’s transaction must wait until Julia has read the savings account value
B. Bill’s transaction must wait until Julia’s lock is released
C. Bill’s transaction is granted permission to perform the desired action
D. None of the above

5. Julia has an exclusive lock on the savings account and Bill is trying to perform an action requesting a shared lock on the same data: 
A. Bill’s transaction must wait until Julia’s lock is released
B. Bill’s transaction is granted permission to perform the desired action
C. Bill’s transaction must wait until Julia has read the savings account value
D. None of the above

6. Which of the following will cause a deadlock? 
A. Transaction T1 requests an exclusive lock on data A at the same time as transaction T2
B. Transaction T1 places an exclusive lock on data A, then transaction T2 requests a shared lock on data A
C. Transaction T1 and T2 modify data A without any lock
D. Transaction T1 places an exclusive lock on data A, then requests one on data B. Simultaneously, transaction T2 places an exclusive lock on data B, then requests one on data A

 

7. Consider a transaction that updates each of the 100 employees’ salaries in a table (there is one row per employee) under the immediate update mode. The transaction terminates abnormally after 10 rows have been updated in the database (and the normal operations have taken place on the log). What should the recovery procedure perform to make sure the transaction completes as desired? 
 
A. Redo
B. Redo followed by execution of the transaction again
C. Undo
D. Undo followed by execution of the transaction again

 

 

8. The _______________  query will output the table contents when the value of the character field P_CODE is alphabetically less 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 = {1558-QW1}

 

 

9. The primary objective of database design is __________________.

A. To create the most efficient database possible

B. To create the fastest queries

C. To create complete, normalized, nonredundant, and fully integrated conceptual, logical, and physical database models

D. To be able to add data quickly

 

10. The command to join the P_DESCRIPT and P_PRICE fields from the PRODUCT table and the V_NAME, V_AREACODE, V_PHONE, and V_CONTACT fields from the VENDOR table where the value 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. User requirements, existing system evaluation, and logical system design are part of the __________ phase of the SDLC.

A. planning      

B. analysis

C. detailed systems design       

D. Implementation

 

 

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

A. Database analysis and requirements

B. Entity relationship modeling and normalization

C. Data model verification

D. Distributed database design

 

13. ___________________ is a disadvantage of a DDBMS.

A. Data is located near the “greatest demand” site

B. Growth facilitation

C. Danger of a single-point failure

D. Lack of standards

 

14. A consistent database is _____________________.

A. One in which all tables have foreign keys

B. One in which all data integrity constraints are satisfied

C. One in which all tables are normalized

D. One in which all SQL statements only update one table at a time

 

15. The ____ contains business data extracted from the operational database and from external data sources.

A. Data store   

B. Data visualization tool

C. Data dictionary       

D. ETL tool

 

16. The ________________  command is used to list a unique value for V_CODE, where the list will produce only a list of those values that are different from one another.

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 must display _____________________.

A. atomicity, serializability, and durability

B. durability and isolation

C. serializability, durability, and isolation

D. atomicity, durability, serializability, and isolation

 

 

18. The ANSI has defined standards that govern SQL database transactions.  Transaction support is provided by two SQL statements: ____________________ and ROLLBACK.

A. RETRIEVE

B. ASSIGN

C. UPDATE   

D. COMMIT

 

19. ____________ query optimization takes place at compilation time.

A. Static          

B. Dynamic

C. Automatic   

D. Manual

 

 

Use the following tables for a car rental database to answer questions 20-25:

 

CUSTOMER
   
 In table CUSTOMER, CID is the primary key (Customer ID).
 
 RENTALS
   
In the table RENTALS, RTN provides the rental number (the primary key), CID is the customer’s unique id, PICKUP is the city where the car was picked up, and Return is the city where the car was returned.
 
 RENTCOST
   
 RENTCOST shows the base cost of renting a given MAKE for one day.
 
 

CITYADJ
   
If the return city of table RENTALS is the one listed in table CITYADJ, the cost of the rental is multiplied by FACTOR and by DAYS shown in table RENTLENGTH below.
 
 RENTLENGTH
   
 RENTLENGTH shows the number of days for the rental number (RTN) shown in table RENTALS. In a database used in reality, this table would be merged with the RENTALS table.

 

20. SELECT DISTINCT CID, CNAME
FROM CUSTOMER
WHERE CID IN
(SELECT CID FROM RENTALS WHERE MAKE IN (‘FORD’, ‘TOYOTA’))
The CNAMEs shown by the execution of this query 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 meaning of this query is:  
A. List all customers with more than one car make rented
B. List all customers with one or more rentals for which the cost of each car make rented is the same
C. List all customers who have only rented one make
D. None 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 query produces the following number of rows:  
A. 0
B. 1
C. 2
D. 3

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 meaning of this query is the following:  
A. List all makes of cars rented to customers residing in Hemet
B. List all makes of cars rented to at least one customer residing in Hemet
C. List all makes of cars rented to all customers residing in Hemet
D. None of the above

 24. SELECT CID, CNAME FROM CUSTOMER
WHERE 0 =
(SELECT COUNT(*) FROM RENTALS
WHERE CUSTOMER.CID = RENTALS.CID)
What is the interpretation of this query?  
A. List the customers who do not have rentals
B. List the customers who have one rental
C. List the customers who have 0 or more rentals
D. List the customers who have 1 or more rentals

 

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 shown by the execution of this query are:  
A. GREEN
B. GREEN, BLACK, SIMON
C. SIMON
D. GREEN, SIMON

 

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

DBST 651

 

 FINAL PART II

 

 

 

Name:                                                                 Date:

 

Question 1:(20 Points)

Use the DBST651_final_Part2_q1.sql script attached to respond the following SQL problems:

Create SQL statements for the following scenarios. Your response should include SQL statement, output and any other assumptions you have made to arrive at the solution.

a. For Colorado customers compute the average amount of their orders and the number of orders placed. The result should include the customer number, customer last name, average order amount and the number of orders placed.

b. For Colorado customers compute the number of unique products ordered. If a product is purchased on multiple orders, it should be counted only one time. The result should include customer number, customer last name and the number of unique products ordered.

c. For each employee with a commission less than 0.04, compute the number of orders taken and the average number of products per order. The results should include the employee number, employee last name, number of orders taken and the average number of products per order.

d. For each Connex product compute the number of unique customers who ordered the product in Jan 2007. The results should include the product number, product name and the number of unique customers.

Question 2:

Please provide answers to problems 1-10 in Chapter 7 of Coronel book page 295-296. (10th edition page 282-284)  (15 Points)

 

Question 3:

Please provide answers to problem 1a-1d in Chapter 10 of Coronel book page 483. (10th edition page 464)  (15 Points)

 

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

 

 

 

DROP TABLE ordline cascade constraints;
Drop TABLE OrderTBL cascade constraints;
DROP TABLE Customer cascade constraints;
dROP TABLE Employee cascade constraints;
DROP TABLE Product cascade constraints;

CREATE TABLE Product
(     ProdNo              CHAR(8),
      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 Color Monitor’,’ColorMeg, Inc.’,12,’20-Feb-2007′,169.00);

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

INSERT INTO product
    (ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
    VALUES (‘P1114590′,’R3000 Color 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′,’8-Outlet Surge Protector’,’Intersafe’,33,”,14.99);

INSERT INTO product
    (ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
    VALUES (‘P1556678′,’CVP Ink Jet Color Printer’,’Connex’,8, ’22-Jan-2007′,99.00);

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

INSERT INTO product
    (ProdNo, ProdName, ProdMfg, ProdQOH, ProdNextShipDate, ProdPrice)
    VALUES (‘P4200344′,’36-Bit Color Scanner’,’UV Components’,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 Back-up System’,’Cybercx’,12,’1-Feb-2007′,89.00);

CREATE TABLE Employee
(     EmpNo          CHAR(8),
      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(8),
        EmpCommRate    DECIMAL(3,3),
CONSTRAINT PKEmployee PRIMARY KEY (EmpNo),
CONSTRAINT UniqueEMail UNIQUE(EmpEMail),
CONSTRAINT FKSupEmpNo FOREIGN KEY (SupEmpNo) REFERENCES Employee )
;

INSERT INTO employee (EmpNo, EmpFirstName, EmpLastName, EmpPhone, EmpEMail,
     SupEmpNo, EmpCommRate)
    VALUES (‘E9884325′,’Thomas’,’Johnson’,'(303) 556-9987′,'[email protected]’,”,0.05);

INSERT INTO employee
    (EmpNo, EmpFirstName, EmpLastName, EmpPhone, EmpEMail,
     SupEmpNo, EmpCommRate)
    VALUES (‘E8843211′,’Amy’,’Tang’,'(303) 556-4321′,'[email protected]’,’E9884325′,0.04);

INSERT INTO employee
    (EmpNo, EmpFirstName, EmpLastName, EmpPhone, EmpEMail,
     SupEmpNo, EmpCommRate)
    VALUES (‘E9345771′,’Colin’,’White’,'(303) 221-4453′,'[email protected]’,’E9884325′,0.04);

INSERT INTO employee
    (EmpNo, EmpFirstName, EmpLastName, EmpPhone, EmpEMail,
     SupEmpNo, EmpCommRate)
    VALUES (‘E1329594′,’Landi’,’Santos’,'(303) 789-1234′,'[email protected]’,’E8843211′,0.02);

INSERT INTO employee
    (EmpNo, EmpFirstName, EmpLastName, EmpPhone, EmpEMail,
     SupEmpNo, EmpCommRate)
    VALUES (‘E8544399′,’Joe’,’Jenkins’,'(303) 221-9875′,'[email protected]’,’E8843211′,0.02);

INSERT INTO employee
    (EmpNo, EmpFirstName, EmpLastName, EmpPhone, EmpEMail,
     SupEmpNo, EmpCommRate)
    VALUES (‘E9954302′,’Mary’,’Hill’,'(303) 556-9871′,'[email protected]’,’E8843211′,0.02);

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

CREATE TABLE Customer
(     CustNo             CHAR(8),
        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 0,
 CONSTRAINT PKCustomer PRIMARY KEY (CustNo)  );

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

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

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

INSERT INTO customer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES(‘C3340959′,’Betty’,’Wise’,’4334 153rd NW’,’Seattle’,’WA’,’98178-3311′,200.00);

INSERT INTO customer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES(‘C3499503′,’Bob’,’Mann’,’1190 Lorraine Cir.’,’Monroe’,’WA’,’98013-1095′,0.00);

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

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

INSERT INTO customer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES(‘C8654390′,’Candy’,’Kendall’,’456 Pine St.’,’Seattle’,’WA’,’98105-3345′,50.00);

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

INSERT INTO customer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES(‘C9403348′,’Mike’,’Boren’,’642 Crest Ave.’,’Englewood’,’CO’,’80113-5431′,0.00);

INSERT INTO customer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES(‘C9432910′,’Larry’,’Styles’,’9825 S. Crest Lane’,’Bellevue’,’WA’,’98104-2211′,250.00);

INSERT INTO customer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES(‘C9543029′,’Sharon’,’Johnson’,’1223 Meyer Way’,’Fife’,’WA’,’98222-1123′,856.00);

INSERT INTO customer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES(‘C9549302′,’Todd’,’Hayes’,’1400 NW 88th’,’Lynnwood’,’WA’,’98036-2244′,0.00);

INSERT INTO customer
    (CustNo, CustFirstName, CustLastName, CustStreet, CustCity,
     CustState, CustZip, CustBal)
    VALUES(‘C9857432′,’Homer’,’Wells’,’123 Main St.’,’Seattle’,’WA’,’98105-4322′,500.00);

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

INSERT INTO customer
    (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(8),
      OrdDate       DATE    CONSTRAINT OrdDateRequired NOT NULL,
    CustNo       CHAR(8) CONSTRAINT CustNoRequired NOT NULL,
        EmpNo       CHAR(8),
        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 Customer,
CONSTRAINT FKEmpNo FOREIGN KEY (EmpNo) REFERENCES Employee  );

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 Styles’,’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′,’Candy 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 Main St.’,’Seattle’,’WA’,’98105-4322′);

CREATE TABLE OrdLine
(     OrdNo     CHAR(8),
      ProdNo    CHAR(8),
    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’,3);

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;

 
"If this is not the paper you were searching for, you can order your 100% plagiarism free, professional written paper now!"

"Do you have an upcoming essay or assignment due?


Get any topic done in as little as 6 hours

If yes Order Similar Paper

All of our assignments are originally produced, unique, and free of plagiarism.