Presentation is loading. Please wait.

Presentation is loading. Please wait.

A scalable algorithm for answering queries using views Rachel Pottinger, Alon Levy [2000] Rachel Pottinger and Alon Y. Levy A Scalable Algorithm for Answering.

Similar presentations


Presentation on theme: "A scalable algorithm for answering queries using views Rachel Pottinger, Alon Levy [2000] Rachel Pottinger and Alon Y. Levy A Scalable Algorithm for Answering."— Presentation transcript:

1 A scalable algorithm for answering queries using views Rachel Pottinger, Alon Levy [2000] Rachel Pottinger and Alon Y. Levy A Scalable Algorithm for Answering Queries Using Views. In Proceedings of VLDB 2000. Presented by: Paea LePendu paea@cs.uoregon.edu

2 Introduction Θ Q(x) :- cites(x,y), cites(y,x), SameTopic(x,y) ● This looks like a RULE (HEAD :- Body) ● Join Predicates / Database relations Θ But this paper is about VIEWS. Θ SQL ↔ Views ↔ Rules Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work SQL ↔ Views ↔ Rules

3 Outline Θ Introduction Θ Motivation Θ Contributions Θ Algorithms Θ Experimental results Θ Future work Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work SQL ↔ Views ↔ Rules Bucket, MiniCon

4 What is a view (in SQL)? Θ Virtual Table Θ Logical data Θ Query vs. View Θ Materialized View Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work SQL ↔ Views ↔ Rules

5 Logical Online Instructor Evaluation System for Whitman College, by Paea LePendu, 2003. Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work

6 Virtual Table Online Instructor Evaluation System for Whitman College, by Paea LePendu, 2003. Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work

7 Re-cap Θ SQL ↔ Views ↔ Rules Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work

8 Datalog Θ Deductive Databases Θ Facts, rules, queries ● Forward Chaining ● Backward Chaining Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work SQL ↔ Views ↔ Rules Ramez Elmasri and Shamkant B. Navathe, Fundamentals of Database Systems (3rd Edition), Addison-Wesley, 2000.

9 Facts, Rules, Queries * Θ superior(james,joyce)? :- supervise(X,Z), superior(Z,Y) (bindings: X→ james, Z → franklin, Y→joyce) Ramez Elmasri and Shamkant B. Navathe, Fundamentals of Database Systems (3 rd Edition), Addison-Wesley, 2000. Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work

10 Re-cap Θ Q(x) :- cites(x,y), cites(y,x), SameTopic(x,y) Θ V4(a) :- cites(a,b), cites(b,a) Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work SQL ↔ Views ↔ Rules

11 Why rewrite a query using a view? Θ Data management Θ Data integration Θ Query optimization Θ Data independence Θ Materialized Views Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work

12 Data Integration Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work Maximally-contained rewriting Conjunctive query Materialized views

13 Contributions Θ MiniCon Θ Algorithm analysis ● Bucket ● Inverse Rules ● MiniCon Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work

14 Q :- V 1, V 2,..., V n Θ NP complete Θ Bucket algorithm Θ Inverse rules algorithm Θ MiniCon algorithm Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work Pottinger et al. 2000 p487.

15 Bucket Θ Redundant rewritings Θ Cartesian product Θ Inefficient Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work Pottinger et al. 2000 p487.

16 Bucket Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work Pottinger et al. 2000 p487.

17 Q :- V 1, V 2,..., V n Θ Bucket algorithm Θ Inverse rules algorithm Θ MiniCon algorithm Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work

18 Inverse Rules Θ Polynomial time Θ Redundant rewritings Θ Redeemable ● Back to Bucket Pottinger et al. 2000 p488. Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work

19 Q :- V 1, V 2,..., V n Θ Bucket algorithm Θ Inverse rules algorithm Θ MiniCon algorithm Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work

20 MiniCon Θ Bucket Θ Change perspective Θ MCD Θ Eliminates redundancy Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work

21 MCD Θ Partial mappings from Vars(Q) to Vars(V) ● Constraint: distinguished range contained in head variables Θ Head homomorphism mappings Θ Covered subgoals ● Constraint: ranged existential variables are distinguished Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work Pottinger et al. 2000 p489.

22 MCD V6(f,h)? 123 y→g? Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work Pottinger et al. 2000 p489. V4(a) | a→a | x→a, y→b | 1,2 (3) eliminated

23 combineMCD Θ Pair-wise disjoint subsets of subgoals ● Define mappings Q↔V ● Create conjunctive rewriting Θ Union resulting conjunctive rewritings Q1'(x) :- V6(x,x) Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work Pottinger et al. 2000 p490. V5(c,d) | c→c, d→d | x→c, y→d | 3 (1,2) eliminated V6(f,f) | f→f, h→f | x→f, y→f | 1,2,3

24 Experimental Results Θ Chain, Star, Complete Queries Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work (a) Steinbrunn, G. Moerkotte, and A. Kemper. Heuristic and randomized optimization for the join. VLDB Journal, 6(3):191-208, 1997. (b) W. Sun and C. Yu. Semantic Query Optimization for Tree and Chain Queries. IEEE Transactions on Knowledge and Data Engineering. 6(1):136-15, 1994. (c) http://www.eecs.umich.edu/db/mbench/images/chainTwig.ppt

25 Chain Queries Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work Pottinger et al. 2000 p492.

26 Star and Complete Queries Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work Pottinger et al. 2000 p493.

27 Future Work Θ Query optimization Θ Semantic Search ? Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work

28 Questions for you Θ Why the distinction between views and materialized views? Θ Is a maximally-contained rewriting satisfactory? Θ What similarities do you see with the Abiteboul et al paper (Correspondence and translation for heterogeneous data)?


Download ppt "A scalable algorithm for answering queries using views Rachel Pottinger, Alon Levy [2000] Rachel Pottinger and Alon Y. Levy A Scalable Algorithm for Answering."

Similar presentations


Ads by Google