cs345-8

# cs345-8 - Searching for Solutions Careful Analysis of...

This preview shows pages 1–9. Sign up to view the full content.

1 Searching for Solutions Careful Analysis of Expansions The Bucket Algorithm

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
2 Solutions and Expansions For every subgoal p(X,Y) of a query, each solution must have a subgoal (view) whose expansion allows a containment mapping to p(X,Y). “Bucket” for a subgoal = set of views that “cover” the subgoal. A solution must include > 1 view from each bucket.
3 But … There’s much more to the story. A careful examination of how variables from the view definitions, query, solution, and expansion relate will eventually reveal additional constraints on the structure of the solutions.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
4 (Non)Distinguished Variables A variable that appears in the head of a CQ is said to be distinguished ; otherwise nondistinguished. p(X,Y) :- q(X,Z) & r(Z,Y) Distinguished Nondistinguished
5 Local Variables of Expansions When we expand a view subgoal of a solution, the nondistinguished variables of the view definition become local . A local variable may not appear anywhere else in the expansion. Variables of the solution substitute for the distinguished variables of a view definition.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
6 Picture Correspond to dist- inguished of the view v(X,Y) :- p(X,Z) & q(Z,Y) sol(U,V) :- … & v(U,W) & … exp(U,V) :- … & p(U,Z1) & q(Z1,W) … Distinguished in solution; may appear elsewhere Nondistinguished in solution; may appear elsewhere Local from view; may not appear except as shown Exposed variables
7 Exposed Variables Variables of the expansion that have substituted for distinguished variables of a view . These are the only variables that may appear in subgoals belonging to the expansion of two different solution subgoals.

This preview has intentionally blurred sections. Sign up to view the full version.

View Full Document
8 The Variables of the Query A query variable is
This is the end of the preview. Sign up to access the rest of the document.

{[ snackBarMessage ]}

### What students are saying

• As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

Kiran Temple University Fox School of Business ‘17, Course Hero Intern

• I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

Dana University of Pennsylvania ‘17, Course Hero Intern

• The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

Jill Tulane University ‘16, Course Hero Intern