1.6 Efficient Data Cube Computation & Indexing OLAP
1.6 Efficient Data Cube Computation & Indexing OLAP
AND TECHNOLOGY
MODULE 1
Faculty - Dr.D.Prabha
DATA WAREHOUSE IMPLEMENTATION
Measure :
• Sales_in_dollars
Example : Compute cube operator
The statement “ compute cube sales “
• It explicitly instructs the system to compute the sales
aggregate cuboids for all the subsets of the set { item, city,
year}
• Generates a lattice of cuboids making up a 3D data cube
‘sales’
• Each cuboid in the lattice corresponds to a subset
Example : Compute cube operator
Cont...
BASE CUBOIDS APEX CUBOIDS
Return total sales for any Group by is empty – contains
combination of 3 dimensions total sum of all sales.
SQL SYNTAX :
define cube sales_cube [city, item , year] : sum
(sales_in_dollars)
Disadvantages
• Required storage space may explode if all of the cuboids in
the data cube are pre computed
Cont...
Consider the following 2 cases for n dimensional cube
Case 1 : Dimensions have no hierarchies
• Then the total number of cuboids computed for a n
dimensional cube = 2n
Case 2: Dimensions have hierarchies
• Then the total number of cuboids computed for a n
dimensional cube :
Full Materialization :
• Pre compute all of the cuboids.
• Resulting lattice of computed cuboids called as Full Cube.
• Huge amount of memory space in order to store all of the pre
computed cuboids.
Cont....
Partial Materialization :
• Selectively compute a proper subset of the whole set of possible
cuboids.
• Resulting lattice of computed cuboids called as Sub Cube.
Factors :
• Identify the subset of cuboids or sub cubes.
Example
ABC Electronics, dimensions – item at top levels has four values
(types) : “home entertainment, computer, phone and security”.
Suppose that cube is stored as a relational table, each item
consists of four values. The table has dimensions item , city and
mapping to bitmap index tables for dimensions.
Cont...
RID Item city RID H C P S
R1 H V R1 1 0 0 0
R2 C V R2 0 1 0 0
R3 P V R3 0 0 1 0
R4 S V R4 0 0 0 1
R5 H T R5 1 0 0 0
R6 C T R6 0 1 0 0
R7 P T R7 0 0 1 0
R8 S T R8 0 0 0 1
T57
Sony_TV
Main Street
T238
T459
T884
Cont...
• To speed up query processing, join and bit map indexing
methods can be integrated to form Bit mapped join indices.