This preview shows page 1. Sign up to view the full content.
Unformatted text preview: this view. create view customerOrderInfo as select loginName, firstName, lastName, sum(totalPrice) as totalPrice from orderInfo group by loginName, firstName, lastName; c) An assertion expressing the fact that even though a customer can be related to many instances of orderCartInfo , a customer can have at most one shopping cart. create assertion customerOneCart check( not exists (select count(orderCartId) as numberOfCart from orderCartInfo where type = S group by customerId having count(orderCartId)> 1)); d) A DDL statement to delete all inventoryItem s that have never appeared in an order. delete from inventoryItem where (itemNum, code) not in (select itemNum, code from lineItems);...
View Full Document
This note was uploaded on 02/27/2011 for the course CSE 412 taught by Professor Davulcu,h during the Spring '08 term at ASU.
- Spring '08