


































Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



































Database Modification
Defining a Database Schema
Views
INSERT INTO Likes(candy, consumer)
VALUES(’Twizzler’, ’Sally’);
INSERT INTO CoShoppers
(SELECT c2.consumer
FROM Frequents c1, Frequents c WHERE c1.consumer = ’Sally’ AND c2.consumer <> ’Sally’ AND c1.store = c2.store
);
8
Pairs of Consumer tuples where the first is for Sally, the second is for someone else, and the stores are the same.
The other consumer (shopper)
DELETE FROM Likes;
UPDATE Sells SET price = 4. WHERE price > 4.00;
CREATE TABLE );
DROP TABLE