Title: MiniCon: A Scalable Algorithm for Answering Queries Using Views
1MiniCon A Scalable Algorithm for Answering
Queries Using Views
- Rachel Pottinger and Alon Levy
- Affiliates Meeting
- February 24, 2000
2Answering Queries Using Views
- Problem access views (stored queries) instead of
original relations - Useful in data integration and query optimization
- NP-Complete
- Many papers on the subject
- No empirical testing of algorithms
3Data Integration
Cheap.com -Prices of cars Cheap(price) -
Cost(model,price)
Car Sale Information
Used.com -Prices and years of used
cars Used(price, year) - Cost(model, price)
Age(model,year)
Query What price do cars made in 1996 sell
for? Query(Price, 1996)- Cost(Model,Price)
Age(Model, 1996)
4View challenges
- Data sources (Cheap.com, Used.com) are
pre-calculated views - Views are not complete
- Get the most answers possible given the views
- Many data sources
5Inverse Rules
- Take the views and invert themCheap(price)-
Cost(car,price) ?Cost(?,price) -
Cheap(price) - Now can query on database relations to find all
relevant rules - Run regular database functions to find answers
- Extended to be more efficient in our paper
6Bucket Algorithm Populating buckets
- For each relation in the query, place relevant
views in the relations bucket - Inputs
- Query(Price,1996)-Cost(Model,Price)
Age(Model,1996) - Cheap(price)-Cost(model,price)
- Used(price,year)-Cost(model,price)
Age(model,year)
Buckets
7Combining Buckets
- For every combination in the Cartesian products
from the buckets, check containment in the query
- Candidate rewritings
- Query1(x) - Cheap(Price)
- Used(_, 1996) ?
- Query2(x) - Used(Price,_)
- Used(_, 1996) ?
Bucket Algorithm will check all possible
combinations
Buckets
8The MiniCon Algorithm
- Concentrate on variables rather than relations to
create MiniCon Descriptions (MCDs) - Combine MCDs that only overlap on returned view
variables
9MiniCon Description Formation
- Form all MiniCon Descriptions (MCDs) that map all
query variables that have to be mapped together - Inputs
- Query(Price,1996)- Cost(Model,Price)
Age(Model,1996) - Cheap(price)-Cost(model,price)
- Used(price,year)-Cost(model,price)
Age(model,year)
view
mapping
relations mapped
Used Model?model, 1, 2
Price?price, 1996?year
MCDs
10MiniCon Combination
- Take all combinations of MCDs that
- map disjoint sets of relations
- map all relations of the query
- MCDs
view
mapping
relations mapped
Used Model?model, 1, 2
Price?price, 1996?year
Rewriting Query(Price,1996)-Used(Price,
1996)
11Experimental resultsMany rewritings
12Experimental ResultsFew rewritings
13See paper for details
- Including
- Further experimental evaluation
- Extension to handle interpreted predicates
- Improvement to Inverse Rules
- Query optimization extension