Presentation is loading. Please wait.

Presentation is loading. Please wait.

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

Similar presentations


Presentation on theme: "Deco Query Processing Hector Garcia-Molina, Aditya Parameswaran, Hyunjung Park, Alkis Polyzotis, Jennifer Widom Stanford and UCSC Scoop The Stanford –"— Presentation transcript:

1 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

2 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

3 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

4 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

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

6 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

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

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

9 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

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

11 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

12 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

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

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


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

Similar presentations


Ads by Google