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
- Spring '08
- shopping cart, Eclectic Online Shopping, assertion customerOneCart check