OLAP2
OLAP2
and OLAP
Monitor
Metadata & OLAP Server
other
source Integrator
s Analysis
Operational Extract Query
DBs Transform Data Serve Reports
Load
Refresh
Warehouse Data mining
Data Marts
C c3 61
c2 45
62 63 64
46 47 48
c1 29 30 31 32 What is the best
c0
b3 B13 14 15 16 60 traversing order
44
9
28 56 to do multi-way
b2
B 40
24 52 aggregation?
b1 5 36
20
b0 1 2 3 4
a0 a1 a2 a3
A
Aggregation for Cube
Computation
C c3 61
c2 45
62 63 64
46 47 48
c1 29 30 31 32
c0
B13 14 15 16 60
b3 44
B 28 56
b2 9
40
24 52
b1 5
36
20
b0 1 2 3 4
a0 a1 a2 a3
A
Aggregation for Cube
Computation
C c3 61
c2 45
62 63 64
46 47 48
c1 29 30 31 32
c0
B13 14 15 16 60
b3 44
B 28 56
b2 9
40
24 52
b1 5
36
20
b0 1 2 3 4
a0 a1 a2 a3
A
Aggregation for Cube
Computation (Cont.)
Method: the planes should be sorted and
computed according to their size in ascending
order.
See the details of Example 4.4
Idea: keep the smallest plane in the main memory,
fetch and compute only one chunk at a time for the
largest plane
Limitation of the method: works well only for a
small number of dimensions
If there are a large number of dimensions, “bottom-up
computation” and iceberg cube computation methods
can be explored
Indexing OLAP Data:
Bitmap Index
Index on a particular column
Each value in the column has a bit vector: bit-op is fast
The length of the bit vector: # of records in the base table
The i-th bit is set if the i-th row of the base table has the
value for the indexed column
not suitable for high cardinality domains
Layer2
MDDB
MDDB
Meta
Data
Filtering&Integration Database API Filtering
Layer1
Data cleaning Data
Databases Data
Data integration Warehouse Repository
Summary
Data warehouse
A subject-oriented, integrated, time-variant, and nonvolatile collection of
data in support of management’s decision-making process
A multi-dimensional model of a data warehouse
Star schema, snowflake schema, fact constellations
A data cube consists of dimensions & measures
OLAP operations: drilling, rolling, slicing, dicing and pivoting
OLAP servers: ROLAP, MOLAP, HOLAP
Efficient computation of data cubes
Partial vs. full vs. no materialization
Multiway array aggregation
Bitmap index and join index implementations
Further development of data cube technology
Discovery-drive and multi-feature cubes
From OLAP to OLAM (on-line analytical mining)
References (I)
S. Agarwal, R. Agrawal, P. M. Deshpande, A. Gupta, J. F. Naughton, R. Ramakrishnan, and S.
Sarawagi. On the computation of multidimensional aggregates. In Proc. 1996 Int. Conf. Very
Large Data Bases, 506-521, Bombay, India, Sept. 1996.
D. Agrawal, A. E. Abbadi, A. Singh, and T. Yurek. Efficient view maintenance in data
warehouses. In Proc. 1997 ACM-SIGMOD Int. Conf. Management of Data, 417-427, Tucson,
Arizona, May 1997.
R. Agrawal, J. Gehrke, D. Gunopulos, and P. Raghavan. Automatic subspace clustering of high
dimensional data for data mining applications. In Proc. 1998 ACM-SIGMOD Int. Conf.
Management of Data, 94-105, Seattle, Washington, June 1998.
R. Agrawal, A. Gupta, and S. Sarawagi. Modeling multidimensional databases. In Proc. 1997
Int. Conf. Data Engineering, 232-243, Birmingham, England, April 1997.
K. Beyer and R. Ramakrishnan. Bottom-Up Computation of Sparse and Iceberg CUBEs. In Proc.
1999 ACM-SIGMOD Int. Conf. Management of Data (SIGMOD'99), 359-370, Philadelphia, PA,
June 1999.
S. Chaudhuri and U. Dayal. An overview of data warehousing and OLAP technology. ACM
SIGMOD Record, 26:65-74, 1997.
OLAP council. MDAPI specification version 2.0. In
http://www.olapcouncil.org/research/apily.htm, 1998.
J. Gray, S. Chaudhuri, A. Bosworth, A. Layman, D. Reichart, M. Venkatrao, F. Pellow, and H.
Pirahesh. Data cube: A relational aggregation operator generalizing group-by, cross-tab and
sub-totals. Data Mining and Knowledge Discovery, 1:29-54, 1997.
References (II)
V. Harinarayan, A. Rajaraman, and J. D. Ullman. Implementing data cubes efficiently. In
Proc. 1996 ACM-SIGMOD Int. Conf. Management of Data, pages 205-216, Montreal,
Canada, June 1996.
Microsoft. OLEDB for OLAP programmer's reference version 1.0. In
http://www.microsoft.com/data/oledb/olap, 1998.
K. Ross and D. Srivastava. Fast computation of sparse datacubes. In Proc. 1997 Int. Conf.
Very Large Data Bases, 116-125, Athens, Greece, Aug. 1997.
K. A. Ross, D. Srivastava, and D. Chatziantoniou. Complex aggregation at multiple
granularities. In Proc. Int. Conf. of Extending Database Technology (EDBT'98), 263-277,
Valencia, Spain, March 1998.
S. Sarawagi, R. Agrawal, and N. Megiddo. Discovery-driven exploration of OLAP data cubes.
In Proc. Int. Conf. of Extending Database Technology (EDBT'98), pages 168-182, Valencia,
Spain, March 1998.
E. Thomsen. OLAP Solutions: Building Multidimensional Information Systems. John Wiley &
Sons, 1997.
Y. Zhao, P. M. Deshpande, and J. F. Naughton. An array-based algorithm for simultaneous
multidimensional aggregates. In Proc. 1997 ACM-SIGMOD Int. Conf. Management of Data,
159-170, Tucson, Arizona, May 1997.
Selection of tables,
attributes, domains in the
DW design process
If you are asked to design a data
warehouse for a set of operational
databases how would you do it?
Use specifications of requirements to design the
data warehouse schema and select:
The central theme(s) of the analysis (e.g., sales)
The measures on the central themes (e.g.,
sum(dollars))
The dimensions used by analytical processing
The attributes and hierarchies of the dimensions
Clean, transform, and integrate information
Example
A large company which sells engine parts
Database 1 (Los Angeles)
employee(id, name, dept, lot, salary, age)
department(id, name, type, manager_id)
part(id, name, type, brand, manufacturer, color)
customer(id, name, type, age, city, state, zip, tel)
sales(id, part_id, customer_id, quantity, price)
Database 2 (New York)
employee(id, ename, dept_id, salary, age)
department(id, name, type, manager)
part(id, title, type, brand, manufacturer, color)
customer(id, name, type, zip, tel)
location(zip, city_id)
city(city_id, state, country)
sales(id, part_id, customer_id, quantity, price)
Example: requirements and
selection
Requirements of the data warehouse
we want to analyze the total sales in dollars
and the average price of sold units with respect
to time, part, customer.
Selection of the basic features of the
warehouse
central theme(s): sales
measure(s): sum(sales_in_dollars),
avg(price_sold_units)
dimensions: time, part, customer
Example: selection of
hierarchies
To determine the dimension hierarchies we
have to select which dimensional attributes
are required to include for analysis
We go back to the requirements and ask
the analyst:
time: day, week, month, quarter, year
part: name, type, color, brand, manufacturer
customer: name, type, city, state, country
Exercise
Find the hierarchies for time, part,
customer
quarter state
part_type
58 18 72 25 30 25
23 12 0 40 9012
23 45 43 33 13 1
2 0 56 23 6 25
manufacturer
(part_brand, part_manufacturer) 23 12 0 0 0 0
0 0 43 33 13 0
0 0 0 0 0 25
Exercise
Find the non-redundant combinations of
the attributes of part.
manufacturer
name
part
Visualization of non-redundant
attribute combinations for part
ALL
manufacturer
(type,color,brand)
name
part
How many (non-redundant)
cuboids ?
How do we compute the total number of cuboids of a data
cube?
Compute the product of the number of combinations for
each dimension
Number of cuboids =
(combinations for time)*
(combinations for part)*
(combinations for customer) =
6*13*9 = 702
Note: sometimes we use the term cuboid to also denote
multidimensional views with selections:
total sales for each (part.type,customer.city) for year = “2001”
We do not count such cuboids in the computation above
Cube: A Lattice of
Cuboids
E.g., (location) is dependent on
all (time,item,location)
time,supplier item,supplier
time,location,supplier
time,item,location
time,item,supplier item,location,supplier
time,supplier item,supplier
time,location,supplier
time,item,location
time,item,supplier item,location,supplier
(cname) – 30MB
should we materialize if
(ALL) – 8 bytes
the available space is:
queries (with equal probability)
1. 10GB
2. 1GB
Q1: total sales per (pname,cname)