56cf7321ad1af044ee0cb92be525c0d1.ppt
- Количество слайдов: 14
Presented By: Amrita Tamrakar 09 -Mar-2006
• • Introduction Importance/Weights of the attributes The Efficiency and response time ? ? Solution View Selection Pipelining Algorithm Conclusion
• 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)
• Preference is the keyword Weights Attributes a 1 a 2 a 3 …. an A 1 A 2 A 3 …. An tuples : Preference function a 1 A 1+a 2 A 2 +…. +Anan
Example Tid 1 2 A 1 10 20 A 2 17 20 A 3 20 11 Score 17. 2 17. 3 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 Relation ………. Prf fn Score Top k tuples Sort
• Ranked Materialized view – 10 -20 views can have most possible queries Queries with linear preference function ∑ Preference vector v = {v 1, . . vn} Attribute preference
Query Preprocessing Stage Select Materialized View Best View for the query Materialized Views View Selection Execute Pipelining Algorithm Finding the top k and sorting Output Results
• 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 { Rv 1…. Rvn } that covers [0, 1]k space, select C views that maximize the number of points in [0, 1]k covered.
• • T = Deteremine. Watermark() 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 Rv Rv 1 Query q t q 1 Rq t qi Ranked tuples
Q=(0. 1, 0. 6, 0. 3) v=(0. 2, 0. 4) Tid A 1 A 2 A 3 fv(t) fq(t) 1 10 17 20 16. 8 17. 2 2 20 20 11 16. 4 3 17 18 12 15. 4 16. 1 4 15 10 8 9. 8 10. 1 5 5 10 12 9 10. 1 6 15 10 5 9 9 Rv 1 17. 3 The first watermark= 14. 26 Sort by fq Till k tuples are retrieved
• Introduction of database selection queries with user preferences • Use of multiple DB views • Algorithms to select the best view • Practical application via PREFER
56cf7321ad1af044ee0cb92be525c0d1.ppt