CSE 344 Final: CSE 344 UW Final Exam Solution 13 Winter

21 views25 pages
31 Jan 2019
School
Course
Professor

Document Summary

1 sql and relational languages: (40 points) An online store uses a database with the following schema: Lineitem(lid, oid, pid, quantity) oid, pid foreign keys to orders, product cid foreign key to customer. Products and customer contains a set of products and of customers respectively. Orders represent orders placed by customers: each order has several lines, called lineitems, each line representing one product that the customer ordered. Each orders record also stores the total value of the order, which is the sum of price*quantity for all line items in that order. The following constraints must be enforced by the database system: all keys and foreign keys, all attributes are not null, price > 0. In addition, the business logic is such that the total in each order equals the sum of price*quantity for all line items in that order. This constraint is maintained by the application logic. March 20, 2013 (a) (10 points) write the create table statements.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers

Related Documents