Database Reference
In-Depth Information
queries, so that view A has probability P ( A )tomatchaquery,view B
has probability P ( B ) , etc.:
(a) How would you change the algorithm to take into account this
knowledge?
(b) Suppose that in the lattice of Fig. 7.9 ,theview ABC is already
materialized. Apply the modified algorithm to select four views
to be materialized given the following probabilities for the views:
P ( ABC )=0 . 1, P ( AB )=0 . 1, P ( AC )=0 . 2, P ( BC )=0 . 3, P ( A )) =
0 . 05, P ( B )=0 . 05, P ( C )=0 . 1, and P ( All )=0 . 1.
(c) Answer the same question as in (b) but now with the probabilities
as follows: P ( ABC )=0 . 1, P ( AB )=0 . 05, P ( AC )=0 . 1, P ( BC )=0,
P ( A )=0 . 2, P ( B )=0 . 1, P ( C )=0 . 05, and P ( All )=0 . 05, Compare
the results.
7.10 Given the Employee table below, show how a bitmap index on attribute
Title would look like. Compress the bitmap values using run-length
encoding.
Employee
Key
Employee
Name
Department
Key
Title Address
City
e1
Peter Brown
Dr.
...
Brussels
d1
e2
James Martin
Mr.
...
Wavre
d1
e3
Ronald Ritchie
Mr.
...
Paris
d2
e4
Marco Benetti
Mr.
...
Versailles
d2
e5
Alexis Manoulis
Mr.
...
London
d3
e6
Maria Mortsel
Mrs.
...
Reading
d3
e7
Laura Spinotti
Mr.
...
Brussels
d4
e8
John River
Mrs.
...
Waterloo
d4
e9
Bert Jasper
Mr.
...
Paris
d5
e10
Claudia Brugman
Mrs.
...
Saint-Denis
d5
7.11 Given the Sales table below and the Employee table from Ex. 7.10 ,show
how a join index on attribute EmployeeKey would look like.
RowID
Sales
Product
Key
Customer
Key
Employee
Key
Time
Key
Sales
Amount
1
p1
c1
e1
t1
100
2
p1
c2
e3
t1
100
3
p2
c2
e4
t2
100
4
p2
c3
e5
t2
100
5
p3
c3
e1
t3
100
6
p4
c4
e2
t4
100
7
p5
c4
e2
t5
100
 
Search WWH ::




Custom Search