Distributed Database Management Systems: Lecture 14. The main topics covered in this chapter include: minterm predicates; PHF-requirements; minterm selectivities sel(mi); access frequencies acc(qi); access frequencies minterm acc(mi); completeness example;...
Trang 1Distributed Database Management Systems
Lecture 14
Trang 2Minterm predicates:
given a set of simple predicates
Pr = {pr1, pr2, …, pm}for a relation R, the set of minterm predicates M is defined as
Trang 3Virtual University of Pakistan 3
Trang 4PAY(title, sal)
p1: title = “El Eng”
p2: title = “Sys Ana”
p3: title = “Mech Eng”
p4: title = “Prog”
p5: SAL ≤ 20,000 p6: SAL > 20000
Trang 5Virtual University of Pakistan 5
Minterm Predicates
Trang 6m1: title = “El Eng” SAL ≤ 20,000
m2: title = “Sys Ana” SAL > 20,000
Trang 7Virtual University of Pakistan 7
PHF-Requirements
3- minterm selectivities sel(mi):
number of tuples of the relation that would be accessed by a user query involving mi Like, sel(m1) = 0 as
per data on p108
Trang 84- Access frequencies acc(qi):
frequency with which user
applications access data If Q(q1,
q2, …, qn} is set of user queries, then acc(qi) determines the
access frequency of qi within a
given period, like acc(q2) = 24
5- Access frequencies minterm
acc(mi) can also be defined from acc(q )
Trang 9Virtual University of Pakistan 9
• A PHF is defined by a selection
operation on the owner
relations of the database
schema, given a relation R, its PHF are given by Ri = Fi
(R), 1 ≤ i ≤ w
– Where F j is a selection formula, which is (preferably) a minterm predicate.
Trang 10PHF (Simple Example)
Trang 11Virtual University of Pakistan 11
Elect Eng 40000Sys Analyst 34000Mech Eng 27000Programmer 24000
PAY
Trang 12PAY1 = σ sal ≤ 30000 (PAY)
Trang 13Virtual University of Pakistan 13
Trang 14• Defining simple predicates may be
tricky
Trang 15Virtual University of Pakistan 15
A set of simple predicates Pr is said to
tuples of the minterm fragments
defined on P r requires
that two tuples of the same minterm
fragment have the same probability of being accessed by the application
Trang 16Completeness Example
Trang 17Virtual University of Pakistan 17
Trang 18–Find the budgets of projects at
each location (1)
–Find projects with budgets less
than 2M (2)
Trang 19Virtual University of Pakistan 19
Trang 20Pr = {LOC=“Lahore”,
LOC=“Rawalpindi”, LOC=“Peshawar”, BUDGET<=200000, BUDGET
>200000}
• Which is complete.
Trang 21Thanks