Lecture 4
Lecture 4
Multidimensional Data
Modeling
and OLAP
PC
UK Phone
Laptop
Q1 Q2 Q3 Product
Time
Q1 Q2 Q3 Q4 sum
TV
tt
uc
PC U.S.A
od
Phone
Pr
Country
sum
Canada
UK
sum
CST3340 _ Business Intelligence Source:Jiawei Han, Micheline Kamber, Jian Pei (2011)
SAMPLE CUBE with aggregates (totals)
PC ofU.S.A
PC in U.S.A.
Pr
Country
In U.S.A Canada
Total sales
Total Q1 sales
In Canada In Canada UK
Total Q1 sales Total sales
In UK In UK sum
Total Q2 sales
Total Q1 sales
In all countries TOTAL SALES
In all countries
CST3340 _ Business Intelligence Source:Jiawei Han, Micheline Kamber, Jian Pei (2011)
What is OLAP?
• Slice:
– Using a slice of cube,
– Reducing the number of dimensions
• Dice:
– Using a sub-cube
– Reducing the number of values considered on
each dimension
• Pivot (rotate):
– Considering different faces of the cube
– Visualising the 3D cube as a series of 2D planes.
• Other operations
– drill across: uses the fact constellation – several
fact table.
– drill through: uses SQL to access the data in the
original relational tables.
all
North
Europe
America
y Month
or
eg
TV
tC
PC U.S.A
uc
Phone
od
Country
Pr
Laptop Canada
UK
France
CST3340 _ Business Intelligence Source:Jiawei Han, Micheline Kamber, Jian Pei (2011)
Example of Roll Up
y Quarter
or
eg
Q1 Q2 Q3 Q4 The data on
t
Ca
TV
PC U.S.A the Time
t
uc
dimension
od
Phone
Country
Pr
CST3340 _ Business Intelligence Source:Jiawei Han, Micheline Kamber, Jian Pei (2011)
Example of Roll Down
y Month
or
eg
TV
PC U.S.A the Time
t
uc
dimension
od
Phone
Country
Pr
CST3340 _ Business Intelligence Source:Jiawei Han, Micheline Kamber, Jian Pei (2011)
Example of Slice on 1 dimension
Month
y Apr
or
TV A slice of
eg
Phone
extracted.
Country
uc
consider
UK the sales in
Apr. This
France produces a
sub cube.
CST3340 _ Business Intelligence Source:Jiawei Han, Micheline Kamber, Jian Pei (2011)
Example of Slice on 2 dimensions
Country
Canada sales of laptops
in Apr. This
UK produces a sub
cube.
France
CST3340 _ Business Intelligence Source:Jiawei Han, Micheline Kamber, Jian Pei (2011)
Example of Dice
A sub cube is
extracted. For
y
Month
or
Example,
eg
PC of Laptops and
uc
Laptop
Country
Canada PCs in January
od
Pr
and April in
France
Canada and
France
CST3340 _ Business Intelligence Source:Jiawei Han, Micheline Kamber, Jian Pei (2011)
Example of Rotation
Rotation
six different
views - Data
Product slicing
Location
Time
• Disadvantages:
– Performance can be slow
• ROLAP can require multiple complex SQL queries which
can be slow for large data sets.
– Limited by functionality of SQL
• SQL does not meet all the requirement of ROLAP, such
as complex calculations.
• Many vendors mitigate this risk by building complex
functions or allowing user defined functions.
RDBMS Multidimensional
Server MDBMS Viewers
Server Multidimensional
SQL Read access
Relational
Multiple dimensional Data Viewers
SQL Read
Relational
Data
•
Chapter 3, Section 3.6:
•
Sharda, Delen, Turban (2018), Business Intelligence
Analytics and Data Science: A management
Perspective. Pearson.