Question from book - Database systems the complete book (second edition) by hector Garcia-molina Jeffery D. Ullman Jennifer Widom
Exercise 7.5.2: Write the following as triggers. In each case,
disallow or undo the modification if it does not satisfy the stated
constraint. The database scheme is from the "PC" example of
Exercise 2.4.1:
Product(maker, model, type)
PC(model, speed, ram, hd, price)
Laptop(model, speed, ram, hd, screen, price)
Printer(model, color, type, price)
A) When updating the price of a PC, check that there is no lower priced PC with the same speed.
B) When inserting a new printer, check that the model number exists in Product.
SOLUTION:-The Required triggers are given below:-
====================================================================================
Question from book - Database systems the complete book (second edition) by hector Garcia-molina Jeffery D....
Database Systems: The Complete Book (2nd Edition), by Hector Garcia-Molina Jeffrey D. Ullman Jennifer Widom Department of Computer Science Stanford University Exercise 14.3.3: The material of this section assumes that search keys are unique. However, only small modifications are needed to allow the techniques to work for search keys with duplicates. Describe the necessary changes to insertion, deletion, and lookup algorithms, and suggest the major problems that arise when there are duplicates in each of the following kinds of hash...