CSE 132A Lecture Notes - Lecture 13: Conjunctive Query, Query Optimization, Society Of Naval Architects And Marine Engineers

32 views3 pages

Document Summary

In general: can simplify pattern p if the db satisfies a set f of fds. Input: pattern p, a set f of fds. Equivalent to p on all relations satisfying f. Intuition: the chase modifies p so that it satisfies all fds in f. Note: assume w/o loss of generality that fds in f are of the form x a where a is 1 attribute. If pattern contains 2 rows that agree on x and disagree on a, change them so that they also agree on a. I. e. choose one over the other (a1 over a2, and replace all instances of a2 w/ a1) Replace a1 with berto! (constant has to be a constant!) They have to be constants! (cannot map to any other value) Invent a new var and make them equal to each other. Input: sql conjunctive query q, set of fds f. Construct sql query corresponding to minimal pattern.

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