140 likes | 257 Views
Prefer: A System for the Efficient Execution. of Multi-parametric Ranked Queries. Vagelis Hristidis. Nick Koudas. Uannis Papakonstantinou. Presented By: Amrita Tamrakar 09-Mar-2006. Contents. Introduction Importance/Weights of the attributes The Efficiency and response time ??
E N D
Prefer: A System for the Efficient Execution of Multi-parametric Ranked Queries Vagelis Hristidis Nick Koudas Uannis Papakonstantinou Presented By: Amrita Tamrakar 09-Mar-2006
Contents • Introduction • Importance/Weights of the attributes • The Efficiency and response time ?? • Solution • View Selection • Pipelining Algorithm • Conclusion
Prefer • Prefer is a layer on top of commercial database which allows efficient evaluation of multi-parametric databases. • Different attributes may have diff weight • House price and bedrooms have more weight than the age. • Cheap houses may be old and small (so search more)
Importance of Attributes • Preference is the keyword Weights Preference function a1A1+a2A2 +….+Anan Attributes tuples
Example Preference = (0.1,0.6,0.3) , Score 10*0.1+17*0.6+20*0.3
Efficiency and Response Time • Retrieve the whole Table • Apply the preference function on each tuple • Sort the tuples Prf fn Relation Score Sort Top k tuples ……….……….
Solution Proposed • Ranked Materialized view • 10-20 views can have most possible queries Queries with linear preference function ∑ Preference vector v = {v1,....vn} Attribute preference
Prefer Architechture Query Preprocessing Stage Select Materialized View Best View for the query Materialized Views Execute Pipelining Algorithm Output Results Finding the top k and sorting View Selection
View Selection • The union of views will cover the whole space • Outputs view sequence V such that for every query q there is at least one view that covers q • Greedy view selection algorithm for space constraints • Given a set of views { Rv1….Rvn }that covers [0,1]k space,select C views that maximize the number of points in [0,1]k covered.
Pipelining Ranked query using ranked view • T = DeteremineWatermark() • Scan Rv for tuples greater than T • Sort these tuples by fq and mark as processed • Continue for unprocessed tuples till top –k is retrieved v R v Rv1 Ranked tuples Query q tqi tq1 R q
Example Q=(0.1,0.6,0.3) v=(0.2,0.4,0.4) Rv1 The first watermark= 14.26 Sort by fq Till k tuples are retrieved
Conclusion • Introduction of database selection queries with user preferences • Use of multiple DB views • Algorithms to select the best view • Practical application via PREFER