CSE 132A Lecture 7: L7 10/22/18

31 views2 pages

Document Summary

Find the drinkers who frequent only bars serving a beer they like. {d: dr | f freq (d(dr) = f(dr) ^ x freq ( x(dr0 = f(dr) s serves l likes (s(bar) = x(bar) ^ s(beer) = l(beer) ^ l(dr) = f(dr))) } Where not exists ( select * from freq x. Testing if an attribute a is null: a is null, a is not null. Arithmetic ops involving any null return null. Boolean expressions involving unknown are evaluated using turth tables. Not exists (select * from serves s, likes l. Where s. bar = x. bar and s. beer = l. beer and l. dr = f. dr )) False and unknown is false, anything else is unknown. *note*: where dir = (cid:3243)null(cid:3244) tests equality on the string null. Salary > 0 = unknown (even if domain restricted to positive integers!) Select name from employee where salary <= 100 or salary > All aggregate ops except count(*) ignore tuples with nulls.

Get access

Grade+
$40 USD/m
Billed monthly
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
10 Verified Answers
Class+
$30 USD/m
Billed monthly
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
7 Verified Answers

Related Documents