CSE 132A Lecture Notes - Lecture 6: Free Variables And Bound Variables

26 views2 pages

Document Summary

Where t is the only free variable. Produces as answer a table with attributes consisting of all tuples v which make. Range of answer tuple: by default the active domain, unless specified in the query. {t: title | s schedule [s(title) = t(title)]} {t: title | m movie [m(director) = (cid:3247)berto(cid:3248) ^ t(title) = m(title)]} Find actors playing in every movie by berto. {a: actor | y movie [a(actor) = y(actor) ^ m movie [m(director) = (cid:3247)berto(cid:3248) t movie (m(title) = t(title) ^ t(actor) = y(actor))]]} M r [ filer(m) property(m) ] Note: basic sql query uses only (no explicit construct for ) Rule: x r (x) = x r (x) Every s in r satisfies phi(x) iff there is no x in r that violates phi(x) Basic rule: one level of nesting for each (cid:3247) (cid:3248) Example: bars: find the bars serving some beer joe likes.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents