Homework 6 - Programming Assignment
Due date: 04 / 19 / 2010
Submit a soft copy through course tools by midnight
No late submissions accepted for this assignment!
This homework covers Grouping, Aggregation, Database Modifications,
Constraints, and Trigger.
Assume that we have a relational database with the
following relations. Data is same as chapter 2.4.14, p53~p54 in textbook.
, speed, ram, hd, price)
, speed, ram, hd, screen, price)
, color, type, price)
For each schema, model attribute is a key. Write answers the
A. Modify your SQL schema from Exercise 2.3.1 to include following constraints
to the relations above.
For each schema, key should not be NULL. A model of a
PC, Laptop, or a Printer must also be the model of
B. Write an ALTER TABLE statement for the following constraint.
The only types of Product relation are