Professional Documents
Culture Documents
Cube Computation and Indexes For Data Warehouses: CPS 196.03 Notes 7
Cube Computation and Indexes For Data Warehouses: CPS 196.03 Notes 7
Processing
ROLAP servers vs. MOLAP servers
Index Structures
Cube computation
What to Materialize?
Algorithms
Client
Client
Metadata
Warehouse
Integration
Source
Source
Source
ROLAP Server
sale
prodId
p1
p2
p1
date
1
1
2
sum
62
19
48
tools
utilities
ROLAP
server
relational
DBMS
MOLAP Server
ty
Ci
B
A
M.D. tools
Product
milk
soda
eggs
soap
utilities
multidimensional
server
2 3 4
Date
could also
sit on
relational
DBMS
Pr
od
u
TV
PC
VCR
sum
1Qtr
2Qtr
Date
3Qtr
4Qtr
sum
Country
ct
MOLAP
sum
MOLAP
c3 61
62
63
64
c2 45
46
47
48
c1 29
30
31
32
c0
b3
b2
B13
14
15
16
28
24
b1
b0
a0
a1
a2
a3
20
44
40
36
60
56
52
Challenges in MOLAP
column major
Chunking
Compressing
sparse arrays
Index Structures
Popular in Warehouses
inverted
lists
bit map indexes
join indexes
text indexes
Inverted Lists
18
19
20
21
22
23
25
26
age
index
r5
r19
r37
r40
rId
r4
r18
r19
r34
r35
r36
r5
r41
name age
joe
20
fred
20
sally
21
nancy 20
tom
20
pat
25
dave
21
jeff
26
...
20
23
r4
r18
r34
r35
inverted
lists
data
records
9
Query:
Get
10
Bit Maps
20
23
20
21
22
1
1
0
1
1
0
0
0
0
23
25
26
age
index
bit
maps
0
0
1
0
0
0
1
0
1
1
id
1
2
3
4
5
6
7
8
name age
joe
20
fred
20
sally
21
nancy 20
tom
20
pat
25
dave
21
jeff
26
...
18
19
data
records
11
Bitmap Index
Base table
Cust
C1
C2
C3
C4
C5
Region
Asia
Europe
Asia
America
Europe
Index on Region
Index on Type
12
Query:
Get
13
Join
Combine SALE, PRODUCT relations
In SQL: SELECT * FROM SALE, PRODUCT WHERE ...
sale
prodId storeId
p1
c1
p2
c1
p1
c3
p2
c2
p1
c1
p1
c2
joinTb
date
1
1
1
1
2
2
prodId
p1
p2
p1
p2
p1
p1
amt
12
11
50
8
44
4
name
bolt
nut
bolt
nut
bolt
bolt
product
price
10
5
10
5
10
10
storeId
c1
c1
c3
c2
c1
c2
date
1
1
1
1
2
2
id
p1
p2
name price
bolt
10
nut
5
amt
12
11
50
8
44
4
14
Join Indexes
join index
product
sale
id
p1
p2
rId
r1
r2
r3
r4
r5
r6
name price
bolt
10
nut
5
jIndex
r1,r3,r5,r6
r2,r4
prodId storeId
p1
c1
p2
c1
p1
c3
p2
c2
p1
c1
p1
c2
date
1
1
1
1
2
2
amt
12
11
50
8
44
4
15
16
Counting Exercise
17
Lattice of Cuboids
129
c1
67
p1
c2
12
c3
50
city
city, product
p1
p2
c1
56
11
c2
4
8
all
product
city, date
date
product, date
c3
50
day 2
day 1
c1
c2
c3
p1
44
4
p2 c1
c2
c3
p1
12
50
p2
11
8
Dimension Hierarchies
all
state
cities
city
c1
c2
state
CA
NY
city
19
Dimension Hierarchies
all
city
city, product
product
city, date
date
product, date
state
state, date
state, product
state, product, date
20
21
Derived Data
22
sale
joinTb
date
1
1
1
1
2
2
prodId
p1
p2
p1
p2
p1
p1
amt
12
11
50
8
44
4
name
bolt
nut
bolt
nut
bolt
bolt
product
price
10
5
10
5
10
10
storeId
c1
c1
c3
c2
c1
c2
date
1
1
1
1
2
2
id
p1
p2
amt
12
11
50
8
44
4
name price
bolt
10
nut
5
23
Transform drill, roll, etc. into corresponding SQL and/or OLAP operations,
e.g., dice = selection + projection
24
What to Materialize?
Store in warehouse results useful for
common queries
Example:
total sales
day 2
day 1
c1
c2
c3
p1
44
4
p2 c1
c2
c3
p1
12
50
p2
11
8
p1
p2
materialize
c1
56
11
c2
4
8
c3
50
...
p1
c1
67
c2
12
c3
50
129
p1
p2
c1
110
19
25
Materialization Factors
Type/frequency of queries
Query response time
Storage cost
Update cost
26
Iceberg Cube
Motivation
27
Challenges in MOLAP
column major
Chunking
Compressing
sparse arrays