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

Slides:



Advertisements
Similar presentations
1 Datalog: Logic Instead of Algebra. 2 Datalog: Logic instead of Algebra Each relational-algebra operator can be mimicked by one or several Database Logic.
Advertisements

1 Decidable Containment of Recursive Queries Diego Calvanese, Giuseppe De Giacomo, Moshe Y. Vardi presented by Axel Polleres
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
Manipulation of Query Expressions. Outline Query unfolding Query containment and equivalence Answering queries using views.
CSE 636 Data Integration Answering Queries Using Views Bucket Algorithm.
CSE 636 Data Integration Conjunctive Queries Containment Mappings / Canonical Databases Slides by Jeffrey D. Ullman.
2005conjunctive-ii1 Query languages II: equivalence & containment (Motivation: rewriting queries using views)  conjunctive queries – CQ’s  Extensions.
Copyright © 2004 Pearson Education, Inc.. Chapter 15 Algorithms for Query Processing and Optimization.
CPSC 504: Data Management Discussion on Chandra&Merlin 1977 Laks V.S. Lakshmanan Dept. of CS UBC.
CS CS4432: Database Systems II Logical Plan Rewriting.
Copyright © 2004 Ramez Elmasri and Shamkant Navathe Elmasri/Navathe, Fundamentals of Database Systems, Fourth Edition Chapter 15-1 Query Processing and.
Chapter 15 Algorithms for Query Processing and Optimization Copyright © 2004 Pearson Education, Inc.
A theory of Attribute Equivalence in Databases with Application to Schema Integration JAMES A.LARSON SHAMKANT B. NAVATHE RAMEZ ELMASRI Presented by REEMA.
SECTION 21.5 Eilbroun Benjamin CS 257 – Dr. TY Lin INFORMATION INTEGRATION.
University of Washington Database Group Tiresias The Database Oracle for How-To Queries Alexandra Meliou § ✜ Dan Suciu ✜ § University of Massachusetts.
Efficient Query Evaluation on Probabilistic Databases
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 5 More SQL: Complex Queries, Triggers, Views, and Schema Modification.
1 A Scalable Algorithm for Answering Queries Using Views Rachel Pottinger Qualifying Exam October 29, 1999 Advisor: Alon Levy.
1 Answering Queries Using Views Alon Y. Halevy Based on Levy et al. PODS ‘95.
Generating Efficient Plans for Queries Using Views Chen Li Stanford University with Foto Afrati (National Technical University of Athens) and Jeff Ullman.
MiniCon: A Scalable Algorithm for Answering Queries Using Views Rachel Pottinger and Alon Levy Affiliates Meeting February 24, 2000.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
Local-as-View Mediators Priya Gangaraju(Class Id:203)
Local-as-View Data Integration Zachary G. Ives University of Pennsylvania CIS 650 – Database & Information Systems February 21, 2005.
TOSS: An Extension of TAX with Ontologies and Similarity Queries Edward Hung, Yu Deng, V.S. Subrahmanian Department of Computer Science University of Maryland,
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
2005lav-iv1  On the Inverse rules algorithm It is guaranteed to compute the certain answers But, what about its efficiency? As presented, it computes.
CSE 636 Data Integration Answering Queries Using Views Overview.
CSE 636 Data Integration Answering Queries Using Views MiniCon Algorithm.
1 CIS607, Fall 2005 Semantic Information Integration Presentation by Zebin Chen Week 7 (Nov. 9)
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 The Relational Algebra and Relational Calculus.
Lecture 5 on Query Optimization
Copyright © 2004 Pearson Education, Inc.. Chapter 8 SQL-99: Schema Definition, Basic Constraints, and Queries.
1 Query Planning with Limited Source Capabilities Chen Li Stanford University Edward Y. Chang University of California, Santa Barbara.
Rada Chirkova (North Carolina State University) and Chen Li (University of California, Irvine) Materializing Views With Minimal Size To Answer Queries.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 9 Relational Database Design by ER- and EER-to- Relational Mapping.
Containment CSE 590 DB Rachel Pottinger. Outline zIntroduction zMotivation zFormal definition zAlgorithms for different complexities zAn application:
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
INFERENCE IN FIRST-ORDER LOGIC IES 503 ARTIFICIAL INTELLIGENCE İPEK SÜĞÜT.
Presenter: Dongning Luo Sept. 29 th 2008 This presentation based on The following paper: Alon Halevy, “Answering queries using views: A Survey”, VLDB J.
Slide Dr. Almetwally Mohamad Mostafa spx is335.
01/02/20031 Welcome to Distributed Databases Course.
Local Cost Estimation for Global Query Optimization in a Multidatabase System Dr. Qiang Zhu The University of Michigan Dearborn, MI, USA.
Context Tailoring the DBMS –To support particular applications Beyond alphanumerical data Beyond retrieve + process –To support particular hardware New.
Copyright © 2004 Pearson Education, Inc.. Chapter 15 Algorithms for Query Processing and Optimization.
Christopher Re and Dan Suciu University of Washington Efficient Evaluation of HAVING Queries on a Probabilistic Database.
Multi-Relational Data Mining: An Introduction Joe Paulowskey.
The Volcano Optimizer Generator Extensibility and Efficient Search.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 6 Part a The Relational Algebra and Relational Calculus Hours 1,2.
Presented by Jiwen Sun, Lihui Zhao 24/3/2004
Answering Queries Using Views: The Last Frontier.
CS848 Presentation Heng YU (Henry)
Chapter 15 Algorithms for Query Processing and Optimization Copyright © 2004 Pearson Education, Inc.
SchemaLog – A Visual Perspective CPSC 534B Laks V.S. Lakshmanan UBC (names of schema components abbreviated.)
Copyright © 2004 Pearson Education, Inc.. Chapter 6 The Relational Algebra and Relational Calculus.
Local-as-View Data Integration Zachary G. Ives University of Pennsylvania CIS 650 – Database & Information Systems October 16, 2008.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Introduction to Query Processing (1) Query optimization: The process of choosing a suitable execution.
Copyright © 2004 Pearson Education, Inc.. Chapter 24 Enhanced Data Models for Advanced Applications.
Lecture 15: Query Optimization. Very Big Picture Usually, there are many possible query execution plans. The optimizer is trying to chose a good one.
1 Integrating Databases into the Semantic Web through an Ontology-based Framework Dejing Dou, Paea LePendu, Shiwoong Kim Computer and Information Science,
Answering Queries Using Views Presented by: Mahmoud ELIAS.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 28 Data Mining Concepts.
CSE202 Database Management Systems
CF 1334 Sistem Basis Data (3 SKS)
February 7th – Exam Review
Query Optimization.
Conjunctive Queries, Views, Datalog Monday, 4/29/2002
Materializing Views With Minimal Size To Answer Queries
Answering Queries Using Views: A Survey
Presentation transcript:

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 Presented by: Paea LePendu

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

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

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

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

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

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

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.

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, Introduction → Motivation → Contributions → Algorithms → Expmt'l Results → Future Work

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

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

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

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

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 p487.

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

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

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

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

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

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

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 p489.

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

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 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

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): , (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, (c)

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

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

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

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)?