Deco Query Processing Hector Garcia-Molina, Aditya Parameswaran, Hyunjung Park, Alkis Polyzotis, Jennifer Widom Stanford and UCSC Scoop The Stanford –

Slides:



Advertisements
Similar presentations
Slide 1 Insert your own content. Slide 2 Insert your own content.
Advertisements

Answering Approximate Queries over Autonomous Web Databases Xiangfu Meng, Z. M. Ma, and Li Yan College of Information Science and Engineering, Northeastern.
Relational Database and Data Modeling
The ANSI/SPARC Architecture of a Database Environment
Query optimisation.
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide
An Annotation Management System for Relational Databases Laura Chiticariu University of California, Santa Cruz Joint work with Deepavali Bhagwat, Wang-Chiew.
Deco — Declarative Crowdsourcing
Chapter Information Systems Database Management.
By Snigdha Rao Parvatneni
HORIZONT TWS/WebAdmin TWS/WebAdmin for Distributed
Relational Database Design Via ER Modelling
Answering Queries using Humans, Algorithms & Databases Aditya Parameswaran Stanford University (Joint work with Alkis Polyzotis, UC Santa Cruz) 1/11/11.
Distributed DBMS©M. T. Özsu & P. Valduriez Ch.15/1 Outline Introduction Background Distributed Database Design Database Integration Semantic Data Control.
COMP 5138 Relational Database Management Systems Semester 2, 2007 Lecture 5A Relational Algebra.
CS 245Notes 71 CS 245: Database System Principles Notes 7: Query Optimization Hector Garcia-Molina.
Querying for Information Integration: How to go from an Imprecise Intent to a Precise Query? Aditya Telang Sharma Chakravarthy, Chengkai Li.
Crowd Algorithms Hector Garcia-Molina, Stephen Guo, Aditya Parameswaran, Hyunjung Park, Alkis Polyzotis, Petros Venetis, Jennifer Widom Stanford and UC.
Chapter 3 The Relational Model Transparencies © Pearson Education Limited 1995, 2005.
CS 245Notes 71 CS 245: Database System Principles Notes 7: Query Optimization Hector Garcia-Molina.
Introduction to Structured Query Language (SQL)
Chapter 3. 2 Chapter 3 - Objectives Terminology of relational model. Terminology of relational model. How tables are used to represent data. How tables.
Introduction to Structured Query Language (SQL)
Chapter 4 Relational Databases Copyright © 2012 Pearson Education, Inc. publishing as Prentice Hall 4-1.
1 Query Planning with Limited Source Capabilities Chen Li Stanford University Edward Y. Chang University of California, Santa Barbara.
Chapter 4 Relational Databases Copyright © 2012 Pearson Education 4-1.
Presenter: Miguel Garzon Torres CrUise Lab - SITE SQL Coverage Measurement for Testing Database Applications María José Suárez-Cabal University of Oviedo.
©Brooks/Cole, 2003 Chapter 14 Databases. ©Brooks/Cole, 2003 Understand a DBMS and define its components. Understand the architecture of a DBMS and its.
CSC271 Database Systems Lecture # 6. Summary: Previous Lecture  Relational model terminology  Mathematical relations  Database relations  Properties.
Lecture 2 The Relational Model. Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical relations.
Chapter 4 The Relational Model Pearson Education © 2014.
Chapter 3 The Relational Model. 2 Chapter 3 - Objectives u Terminology of relational model. u How tables are used to represent data. u Connection between.
©Silberschatz, Korth and Sudarshan13.1Database System Concepts Chapter 13: Query Processing Overview Measures of Query Cost Selection Operation Sorting.
Data-Centric Human Computation Jennifer Widom Stanford University.
Copyright © Curt Hill The Relational Model of Database Basic organization and terms.
1 The Relational Database Model. 2 Learning Objectives Terminology of relational model. How tables are used to represent data. Connection between mathematical.
9/7/2012ISC329 Isabelle Bichindaritz1 The Relational Database Model.
6 1 Lecture 8: Introduction to Structured Query Language (SQL) J. S. Chou, P.E., Ph.D.
Chapter 2: Intro to Relational Model. 2.2 Example of a Relation attributes (or columns) tuples (or rows)
Introduction.  Administration  Simple DBMS  CMPT 454 Topics John Edgar2.
Dec. 13, 2002 WISE2002 Processing XML View Queries Including User-defined Foreign Functions on Relational Databases Yoshiharu Ishikawa Jun Kawada Hiroyuki.
The Relational Model. 2 Relational Model Terminology u A relation is a table with columns and rows. –Only applies to logical structure of the database,
Jennifer Widom Relational Databases The Relational Model.
The Relational Model © Pearson Education Limited 1995, 2005 Bayu Adhi Tama, M.T.I.
Chapter 13 Query Optimization Yonsei University 1 st Semester, 2015 Sanghyun Park.
Database Environment Chapter 2. The Three-Level ANSI-SPARC Architecture External Level Conceptual Level Internal Level Physical Data.
Chapter 4 The Relational Model Pearson Education © 2009.
Address – 32 bits WRITE Write Cache Write Main Byte Offset Tag Index Valid Tag Data 16K entries 16.
Module 2: Intro to Relational Model
Relational Model By Dr.S.Sridhar, Ph.D.(JNUD), RACI(Paris, NICE), RMR(USA), RZFM(Germany)
Prepared by : Ankit Patel (226)
Chapter 4 Relational Databases
Relational Algebra Chapter 4, Part A
Entity-Relationship Model and Diagrams (continued)
Deco: Declarative Crowdsourcing
Relational Databases The Relational Model.
Relational Databases The Relational Model.
Chapter 4 The Relational Model Pearson Education © 2009.
Selected Topics: External Sorting, Join Algorithms, …
Chapters 15 and 16b: Query Optimization
Lecture 2- Query Processing (continued)
Chapter 4 The Relational Model Pearson Education © 2009.
Database management concepts
Chapter 4 The Relational Model Pearson Education © 2009.
Chapter 2: Intro to Relational Model
Example of a Relation attributes (or columns) tuples (or rows)
Chapter 2: Intro to Relational Model
Chapter 4 The Relational Model Pearson Education © 2009.
Probabilistic Ranking of Database Query Results
Views Base Relation View
Presentation transcript:

Deco Query Processing Hector Garcia-Molina, Aditya Parameswaran, Hyunjung Park, Alkis Polyzotis, Jennifer Widom Stanford and UCSC Scoop The Stanford – Santa Cruz Project for Cooperative Computing with Algorithms, Data, and People

Valid Instance of Database 2 RDBMS Actual schema Conceptual schema Schema designer relations and other stuff End user relations automatic (system) Given: Current contents of Deco tables (actual schema) Fetch Rules and Resolution Rules Valid instance (conceptual schema) is any state of relations obtained by: 1. Fetch add tuples to Deco tables by invoking FR procedures 2. Resolve resolve dependent attributes using RR functions 3. Join full outerjoin of Deco tables for each relation

Query Semantics 3 Deco query Q Relational query (over the conceptual schema) Result of a Deco query Q Result of Q (using relational semantics) over some valid instance of the database Which valid instance? Current one (no fetch step): result may be empty Factors restricting valid instances for Q: Number of result tuples, Quality of results Running time, Monetary cost

Query Processing Objective 4 For now: The user specifies the minimum number of tuples in the result of Q Query processor minimizes a combination of running time and monetary cost Alternative: Given upper bounds of running time and monetary cost, maximize the number of result tuples and their quality

Rest of This Presentation Four example query plans demonstrating: Query operators Placing FRs in query plans 5

Example Schema R (restaurant, address, [rating], [cuisine]) Resolution Rules restaurant,address rating restaurant cuisine Fetch Rules restaurant,address rating restaurant cuisine restaurant,address rating,cuisine cuisine restaurant,address restaurant,address 6

Example #1: Query Operators 7 Fetch [ rest,addr] Fetch [rest,addr rating] Join Filter [rating=4] SELECT rest, addr FROM R WHERE rating=4 MINTUPLES 5 Resolve [conf0.8] A1+MTurk A2+MTurk Retrieves tuples in the underlying Deco table Then, fetches more tuples from external source Stores externally obtained tuples in the Deco table Retrieves tuples from its child operator Feeds retrieved tuples to the RR function until the resolved value is good enough MinTuples [5]

SELECT rest, addr FROM R WHERE rating=4 MINTUPLES 5 Example #1: Query Operators 8 Fetch [ rest,addr] Fetch [rest,addr rating] Join Sync [rating] Filter [rating=4] Resolve [conf0.8] A1+MTurk A2+MTurk Sync [rest,addr] Initiate FR procedure Returns incomplete tuple with placeholders Waits until placeholders are replaced by actual values MinTuples [5]

Example #2: FR Scheduling 9 Fetch & Sync [ rest,addr] Fetch & Resolve [rest,addr rating] Fetch & Resolve [rest cuisine] Join Sync [rating,cuisine] Filter [rating=4] MinTuples [5] FRs operate in parallel Shorter running time More $$ SELECT * FROM R WHERE rating=4 MINTUPLES 5

Example #2: FR Scheduling 10 Join Sync [rating] Filter [rating=4] Sync [cuisine] SELECT * FROM R WHERE rating=4 MINTUPLES 5 Fetch & Sync [ rest,addr] Fetch & Resolve [rest,addr rating] Fetch & Resolve [rest cuisine] Join MinTuples [5] FRs operate serially Longer running time Less $$

Example #3: FR Composition 11 Fetch & Sync [ rest,addr] Fetch & Resolve [rest,addr rating] Fetch & Resolve [rest cuisine] Join Sync [rating,cuisine] SELECT * FROM R MINTUPLES 5 MinTuples [5] One FR for each dependent attribute group More FR invocations

Example #3: FR Composition 12 Fetch & Sync [ rest,addr] Fetch & Resolve [rest,addr rating,cuisine] Join Sync [rating, cuisine] SELECT * FROM R MINTUPLES 5 MinTuples [5] Composite FR for both dependent attribute groups Fewer FR invocations

Example #4: Reverse FR 13 Fetch & Sync [ rest,addr] Fetch & Resolve [rest cuisine] Join Sync [cuisine] Filter [cuisine=French] SELECT rest, addr FROM R WHERE cuisine=French MINTUPLES 5 What if there are few French restaurants? MinTuples [5]

Example #4: Reverse FR 14 Fetch & Sync [cuisine:French rest,addr] Fetch & Resolve [rest cuisine] Join Sync [cuisine] Filter [cuisine=French] SELECT rest, addr FROM R WHERE cuisine=French MINTUPLES 5 Shorter running time using Reverse FR MinTuples [5]