SlideShare uma empresa Scribd logo
1 de 28
-
1
Data Warehousing
Multidimensional OLAP (MOLAP)
Ch Anwar ul Hassan (Lecturer)
Department of Computer Science and Software
Engineering
Capital University of Sciences & Technology, Islamabad
Pakistan
anwarchaudary@gmail.com
-
2
Multidimensional OLAP (MOLAP)
-
3
OLAP Implementations
1. MOLAP: OLAP implemented with a multi-
dimensional data structure.
2. ROLAP: OLAP implemented with a relational
database.
3. HOLAP: OLAP implemented as a hybrid of MOLAP
and ROLAP.
4. DOLAP: OLAP implemented for desktop decision
support environments.
-
4
MOLAP Implementations
OLAP has historically been implemented using a
multi_dimensional data structure or “cube”.
 Dimensions are key business factors for analysis:
 Geographies (city, district, division, province,...)
 Products (item, product category, product department,...)
 Dates (day, week, month, quarter, year,...)
 Very high performance achieved by O(1) time
lookup into “cube” data structure to retrieve
pre_aggregated results.
-
5
MOLAP Implementations
 No standard query language for querying MOLAP
- No SQL !
 Vendors provide proprietary languages allowing
business users to create queries that involve pivots,
drilling down, or rolling up.
- E.g. MDX of Microsoft
- Languages generally involve extensive visual (click and
drag) support.
- Application Programming Interface (API)’s also provided
for probing the cubes.
-
6
Aggregations in MOLAP
 Sales volume as a function of (i) product, (ii) time,
and (iii) geography
 A cube structure created to handle this.
Dimensions: Product, Geography, Time
Industry
Category
Product
Hierarchical summarization paths
Product
Time
w1 w2 w3 w4 w5 w6
Milk
Bread
Eggs
Butter
Jam
Juice
N
E
W
S
12
13
45
8
23
10
Province
Division
District
City
Zone
Year
Quarter
Month Week
Day
-
7
Cube operations
 Drill down: get more details
 e.g., given summarized sales as above, find breakup
of sales by city within each region, or within Sindh
 Rollup: summarize data
 e.g., given sales data, summarize sales for last year
by product category and region
 Slice and dice: select and project
 e.g.: Sales of soft-drinks in Karachi during last
quarter
 Pivot: change the view of data
-
8
Drill-down
-
2,000
4,000
6,000
8,000
10,000
12,000
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
OJ RK 8UP PK MJ BU AJ
2001 2002
Querying the cube
-
5,000
10,000
15,000
20,000
25,000
30,000
35,000
40,000
2001 2002
Juices Soda Drinks
-
2,000
4,000
6,000
8,000
10,000
12,000
14,000
Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4
Juices Soda Drinks
2001 2002
Drill-Down
Roll-Up
-
9
Querying the cube: Pivoting
-
5,000
10,000
15,000
20,000
25,000
30,000
35,000
40,000
2001 2002
Juices Soda Drinks
-
2,000
4,000
6,000
8,000
10,000
12,000
14,000
16,000
18,000
Orange
juice
Mango
juice
Apple
juice
Rola-
Kola
8-UP Bubbly-
UP
Pola-
Kola
2001 2002
-
10
MOLAP evaluation
Advantages of MOLAP:
 Instant response (pre-calculated aggregates).
 Impossible to ask question without an answer.
 Value added functions (ranking, % change).
-
11
MOLAP evaluation
Drawbacks of MOLAP:
 Long load time ( pre-calculating the cube
may take days!).
 Very sparse cube (wastage of space) for
high cardinality (sometimes in small
hundreds). e.g. number of heaters sold in
Jacobabad or Sibi.
-
12
MOLAP Implementation issues
Maintenance issue: Every data item
received must be aggregated into every cube
(assuming “to-date” summaries are
maintained). Lot of work.
Storage issue: As dimensions get less
detailed (e.g., year vs. day) cubes get much
smaller, but storage consequences for
building hundreds of cubes can be significant.
Lot of space.
-
13
Partitioned Cubes
 To overcome the space limitation of MOLAP, the cube is
partitioned.
 The divide&conquer cube partitioning approach helps
alleviate the scalability limitations of MOLAP
implementation.
 One logical cube of data can be spread across multiple
physical cubes on separate (or same) servers.
 Ideal cube partitioning is completely invisible to end
users.
 Performance degradation does occurs in case of a join
across partitioned cubes.
-
14
Partitioned Cubes: How it looks Like?
Time
Geography
Men’s clothing
Children clothing
Bed linen
Sales data cube partitioned at a major cotton
products sale outlet
Product
-
15
Virtual Cubes
Used to query two dissimilar cubes by creating a
third “virtual” cube by a join between two cubes.
 Logically similar to a relational view i.e. linking two
(or more) cubes along common dimension(s).
 Biggest advantage is saving in space by eliminating
storage of redundant information.
Example: Joining the store cube and the list price
cube along the product dimension, to calculate the
sale price without redundant storage of the sale
price data.
-
16
Relational OLAP (ROLAP)
-
17
Why ROLAP?
Issue of scalability i.e. curse of dimensionality
for MOLAP
 Deployment of significantly large dimension tables
as compared to MOLAP using secondary storage.
 Aggregate awareness allows using pre-built
summary tables by some front-end tools.
 Star schema designs usually used to facilitate
ROLAP querying (in next lecture).
-
18
ROLAP as a “Cube”
 OLAP data is stored in a relational database (e.g. a
star schema)
 The fact table is a way of visualizing as a “un-rolled”
cube.
 So where is the cube?
 It’s a matter of perception
 Visualize the fact table as an elementary cube.
Product
Time
500Z1P2M2
250Z1P1M1
Sale K Rs.ZoneProductMonth
Fact Table
-
19
How to create “Cube” in ROLAP
 Cube is a logical entity containing values of a
certain fact at a certain aggregation level at an
intersection of a combination of dimensions.
 The following table can be created using 3 queries
SUM
(Sales_Amt)
M1 M2 M3 ALL
P1
P2
P3
Total
Month_ID
Product_ID
-
20
 For the table entries, without the totals
SELECT S.Month_Id, S.Product_Id,
SUM(S.Sales_Amt)
FROM Sales
GROUP BY S.Month_Id, S.Product_Id;
 For the row totals
SELECT S.Product_Id, SUM (Sales_Amt)
FROM Sales
GROUP BY S.Product_Id;
 For the column totals
SELECT S.Month_Id, SUM (Sales)
FROM Sales
GROUP BY S.Month_Id;
How to create “Cube” in ROLAP using SQL
-
21
CUBE Clause
 The CUBE clause is part of SQL:1999
 GROUP BY CUBE (v1, v2, …, vn)
 Equivalent to a collection of GROUP BYs, one for
each of the subsets of v1, v2, …, vn
-
22
ROLAP & Space Requirement
If one is not careful, with the increase in number of
dimensions, the number of summary tables gets very
large.
-
23
ROLAP Issues
 Maintenance.
 Non standard hierarchy of dimensions.
 Non standard conventions.
Aggregation pit-falls.
-
24
 Maximum performance boost implies using
lots of disk space for storing every pre-
calculation.
 Minimum performance boost implies no disk
space with zero pre-calculation.
 Using meta data to determine best level of
pre-aggregation from which all other
aggregates can be computed.
Performance vs. Space Trade-Off
Performance vs. Space Trade-off using Wizard
20
40
60
80
100
2 4 6 8


MB
%Gain Aggregation answers
most queries
Aggregation
answers few queries
-
25
-
26
HOLAP
 Target is to get the best of both worlds.
 HOLAP (Hybrid OLAP) allow co-existence of
pre-built MOLAP cubes alongside relational
OLAP or ROLAP structures.
-
27
DOLAP
Cube on the
remote server
Local
Machine/Server
Subset of the cube is
transferred to the local
machine
-
28
End

Mais conteúdo relacionado

Semelhante a Intro to Data warehousing Lecture 06

Dwh lecture 11-molap
Dwh  lecture 11-molapDwh  lecture 11-molap
Dwh lecture 11-molapSulman Ahmed
 
Project report aditi paul1
Project report aditi paul1Project report aditi paul1
Project report aditi paul1guest9529cb
 
Lecture 12
Lecture 12Lecture 12
Lecture 12Shani729
 
IT301-Datawarehousing (1) and its sub topics.pptx
IT301-Datawarehousing (1) and its sub topics.pptxIT301-Datawarehousing (1) and its sub topics.pptx
IT301-Datawarehousing (1) and its sub topics.pptxReneeClintGortifacio
 
OLAP Reporting with Crystal Reports 9
OLAP Reporting with Crystal Reports 9OLAP Reporting with Crystal Reports 9
OLAP Reporting with Crystal Reports 9Mickey Wong
 
Lecture 11
Lecture 11Lecture 11
Lecture 11Shani729
 
OLAP Cubes in Datawarehousing
OLAP Cubes in DatawarehousingOLAP Cubes in Datawarehousing
OLAP Cubes in DatawarehousingPrithwis Mukerjee
 
Data Warehousing
Data WarehousingData Warehousing
Data WarehousingHeena Madan
 
Online analytical processing
Online analytical processingOnline analytical processing
Online analytical processingnurmeen1
 
Bw training 1 intro dw
Bw training   1 intro dwBw training   1 intro dw
Bw training 1 intro dwJoseph Tham
 
Building a semantic/metrics layer using Calcite
Building a semantic/metrics layer using CalciteBuilding a semantic/metrics layer using Calcite
Building a semantic/metrics layer using CalciteJulian Hyde
 

Semelhante a Intro to Data warehousing Lecture 06 (20)

Dwh lecture 11-molap
Dwh  lecture 11-molapDwh  lecture 11-molap
Dwh lecture 11-molap
 
ch19.ppt
ch19.pptch19.ppt
ch19.ppt
 
ch19.ppt
ch19.pptch19.ppt
ch19.ppt
 
Project report aditi paul1
Project report aditi paul1Project report aditi paul1
Project report aditi paul1
 
DWO -Pertemuan 1
DWO -Pertemuan 1DWO -Pertemuan 1
DWO -Pertemuan 1
 
Lecture 12
Lecture 12Lecture 12
Lecture 12
 
CS636-olap.ppt
CS636-olap.pptCS636-olap.ppt
CS636-olap.ppt
 
IT301-Datawarehousing (1) and its sub topics.pptx
IT301-Datawarehousing (1) and its sub topics.pptxIT301-Datawarehousing (1) and its sub topics.pptx
IT301-Datawarehousing (1) and its sub topics.pptx
 
OLAP Reporting with Crystal Reports 9
OLAP Reporting with Crystal Reports 9OLAP Reporting with Crystal Reports 9
OLAP Reporting with Crystal Reports 9
 
Lecture 11
Lecture 11Lecture 11
Lecture 11
 
OLAP Cubes in Datawarehousing
OLAP Cubes in DatawarehousingOLAP Cubes in Datawarehousing
OLAP Cubes in Datawarehousing
 
Essbase intro
Essbase introEssbase intro
Essbase intro
 
mod 2.pdf
mod 2.pdfmod 2.pdf
mod 2.pdf
 
OLAP
OLAPOLAP
OLAP
 
DW-lecture2.ppt
DW-lecture2.pptDW-lecture2.ppt
DW-lecture2.ppt
 
Data Warehousing
Data WarehousingData Warehousing
Data Warehousing
 
Datawarehosuing
DatawarehosuingDatawarehosuing
Datawarehosuing
 
Online analytical processing
Online analytical processingOnline analytical processing
Online analytical processing
 
Bw training 1 intro dw
Bw training   1 intro dwBw training   1 intro dw
Bw training 1 intro dw
 
Building a semantic/metrics layer using Calcite
Building a semantic/metrics layer using CalciteBuilding a semantic/metrics layer using Calcite
Building a semantic/metrics layer using Calcite
 

Mais de AnwarrChaudary

Intro to Data warehousing lecture 20
Intro to Data warehousing   lecture 20Intro to Data warehousing   lecture 20
Intro to Data warehousing lecture 20AnwarrChaudary
 
Intro to Data warehousing lecture 19
Intro to Data warehousing   lecture 19Intro to Data warehousing   lecture 19
Intro to Data warehousing lecture 19AnwarrChaudary
 
Intro to Data warehousing lecture 18
Intro to Data warehousing   lecture 18Intro to Data warehousing   lecture 18
Intro to Data warehousing lecture 18AnwarrChaudary
 
Intro to Data warehousing lecture 17
Intro to Data warehousing   lecture 17Intro to Data warehousing   lecture 17
Intro to Data warehousing lecture 17AnwarrChaudary
 
Intro to Data warehousing lecture 16
Intro to Data warehousing   lecture 16Intro to Data warehousing   lecture 16
Intro to Data warehousing lecture 16AnwarrChaudary
 
Intro to Data warehousing lecture 15
Intro to Data warehousing   lecture 15Intro to Data warehousing   lecture 15
Intro to Data warehousing lecture 15AnwarrChaudary
 
Intro to Data warehousing lecture 14
Intro to Data warehousing   lecture 14Intro to Data warehousing   lecture 14
Intro to Data warehousing lecture 14AnwarrChaudary
 
Intro to Data warehousing lecture 13
Intro to Data warehousing   lecture 13Intro to Data warehousing   lecture 13
Intro to Data warehousing lecture 13AnwarrChaudary
 
Intro to Data warehousing lecture 12
Intro to Data warehousing   lecture 12Intro to Data warehousing   lecture 12
Intro to Data warehousing lecture 12AnwarrChaudary
 
Intro to Data warehousing lecture 11
Intro to Data warehousing   lecture 11Intro to Data warehousing   lecture 11
Intro to Data warehousing lecture 11AnwarrChaudary
 
Intro to Data warehousing lecture 10
Intro to Data warehousing   lecture 10Intro to Data warehousing   lecture 10
Intro to Data warehousing lecture 10AnwarrChaudary
 
Intro to Data warehousing lecture 09
Intro to Data warehousing   lecture 09Intro to Data warehousing   lecture 09
Intro to Data warehousing lecture 09AnwarrChaudary
 
Intro to Data warehousing lecture 08
Intro to Data warehousing   lecture 08Intro to Data warehousing   lecture 08
Intro to Data warehousing lecture 08AnwarrChaudary
 
Intro to Data warehousing lecture 05
Intro to Data warehousing   lecture 05Intro to Data warehousing   lecture 05
Intro to Data warehousing lecture 05AnwarrChaudary
 
Intro to Data warehousing Lecture 04
Intro to Data warehousing   Lecture 04Intro to Data warehousing   Lecture 04
Intro to Data warehousing Lecture 04AnwarrChaudary
 
Intro to Data warehousing lecture 03
Intro to Data warehousing   lecture 03Intro to Data warehousing   lecture 03
Intro to Data warehousing lecture 03AnwarrChaudary
 
Intro to Data warehousing lecture 02
Intro to Data warehousing   lecture 02Intro to Data warehousing   lecture 02
Intro to Data warehousing lecture 02AnwarrChaudary
 
Introduction to Data Warehouse
Introduction to Data WarehouseIntroduction to Data Warehouse
Introduction to Data WarehouseAnwarrChaudary
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software EngineeringAnwarrChaudary
 
PDCA Plan Do Check Act
PDCA Plan Do Check ActPDCA Plan Do Check Act
PDCA Plan Do Check ActAnwarrChaudary
 

Mais de AnwarrChaudary (20)

Intro to Data warehousing lecture 20
Intro to Data warehousing   lecture 20Intro to Data warehousing   lecture 20
Intro to Data warehousing lecture 20
 
Intro to Data warehousing lecture 19
Intro to Data warehousing   lecture 19Intro to Data warehousing   lecture 19
Intro to Data warehousing lecture 19
 
Intro to Data warehousing lecture 18
Intro to Data warehousing   lecture 18Intro to Data warehousing   lecture 18
Intro to Data warehousing lecture 18
 
Intro to Data warehousing lecture 17
Intro to Data warehousing   lecture 17Intro to Data warehousing   lecture 17
Intro to Data warehousing lecture 17
 
Intro to Data warehousing lecture 16
Intro to Data warehousing   lecture 16Intro to Data warehousing   lecture 16
Intro to Data warehousing lecture 16
 
Intro to Data warehousing lecture 15
Intro to Data warehousing   lecture 15Intro to Data warehousing   lecture 15
Intro to Data warehousing lecture 15
 
Intro to Data warehousing lecture 14
Intro to Data warehousing   lecture 14Intro to Data warehousing   lecture 14
Intro to Data warehousing lecture 14
 
Intro to Data warehousing lecture 13
Intro to Data warehousing   lecture 13Intro to Data warehousing   lecture 13
Intro to Data warehousing lecture 13
 
Intro to Data warehousing lecture 12
Intro to Data warehousing   lecture 12Intro to Data warehousing   lecture 12
Intro to Data warehousing lecture 12
 
Intro to Data warehousing lecture 11
Intro to Data warehousing   lecture 11Intro to Data warehousing   lecture 11
Intro to Data warehousing lecture 11
 
Intro to Data warehousing lecture 10
Intro to Data warehousing   lecture 10Intro to Data warehousing   lecture 10
Intro to Data warehousing lecture 10
 
Intro to Data warehousing lecture 09
Intro to Data warehousing   lecture 09Intro to Data warehousing   lecture 09
Intro to Data warehousing lecture 09
 
Intro to Data warehousing lecture 08
Intro to Data warehousing   lecture 08Intro to Data warehousing   lecture 08
Intro to Data warehousing lecture 08
 
Intro to Data warehousing lecture 05
Intro to Data warehousing   lecture 05Intro to Data warehousing   lecture 05
Intro to Data warehousing lecture 05
 
Intro to Data warehousing Lecture 04
Intro to Data warehousing   Lecture 04Intro to Data warehousing   Lecture 04
Intro to Data warehousing Lecture 04
 
Intro to Data warehousing lecture 03
Intro to Data warehousing   lecture 03Intro to Data warehousing   lecture 03
Intro to Data warehousing lecture 03
 
Intro to Data warehousing lecture 02
Intro to Data warehousing   lecture 02Intro to Data warehousing   lecture 02
Intro to Data warehousing lecture 02
 
Introduction to Data Warehouse
Introduction to Data WarehouseIntroduction to Data Warehouse
Introduction to Data Warehouse
 
Introduction to Software Engineering
Introduction to Software EngineeringIntroduction to Software Engineering
Introduction to Software Engineering
 
PDCA Plan Do Check Act
PDCA Plan Do Check ActPDCA Plan Do Check Act
PDCA Plan Do Check Act
 

Último

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptxMaritesTamaniVerdade
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin ClassesCeline George
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...Poonam Aher Patil
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17Celine George
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfagholdier
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.christianmathematics
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docxPoojaSen20
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseAnaAcapella
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.MaryamAhmad92
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 

Último (20)

2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
2024-NATIONAL-LEARNING-CAMP-AND-OTHER.pptx
 
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17  How to Extend Models Using Mixin ClassesMixin Classes in Odoo 17  How to Extend Models Using Mixin Classes
Mixin Classes in Odoo 17 How to Extend Models Using Mixin Classes
 
General Principles of Intellectual Property: Concepts of Intellectual Proper...
General Principles of Intellectual Property: Concepts of Intellectual  Proper...General Principles of Intellectual Property: Concepts of Intellectual  Proper...
General Principles of Intellectual Property: Concepts of Intellectual Proper...
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17How to Create and Manage Wizard in Odoo 17
How to Create and Manage Wizard in Odoo 17
 
Holdier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdfHoldier Curriculum Vitae (April 2024).pdf
Holdier Curriculum Vitae (April 2024).pdf
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
psychiatric nursing HISTORY COLLECTION .docx
psychiatric  nursing HISTORY  COLLECTION  .docxpsychiatric  nursing HISTORY  COLLECTION  .docx
psychiatric nursing HISTORY COLLECTION .docx
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Asian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptxAsian American Pacific Islander Month DDSD 2024.pptx
Asian American Pacific Islander Month DDSD 2024.pptx
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024Mehran University Newsletter Vol-X, Issue-I, 2024
Mehran University Newsletter Vol-X, Issue-I, 2024
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 

Intro to Data warehousing Lecture 06

  • 1. - 1 Data Warehousing Multidimensional OLAP (MOLAP) Ch Anwar ul Hassan (Lecturer) Department of Computer Science and Software Engineering Capital University of Sciences & Technology, Islamabad Pakistan anwarchaudary@gmail.com
  • 3. - 3 OLAP Implementations 1. MOLAP: OLAP implemented with a multi- dimensional data structure. 2. ROLAP: OLAP implemented with a relational database. 3. HOLAP: OLAP implemented as a hybrid of MOLAP and ROLAP. 4. DOLAP: OLAP implemented for desktop decision support environments.
  • 4. - 4 MOLAP Implementations OLAP has historically been implemented using a multi_dimensional data structure or “cube”.  Dimensions are key business factors for analysis:  Geographies (city, district, division, province,...)  Products (item, product category, product department,...)  Dates (day, week, month, quarter, year,...)  Very high performance achieved by O(1) time lookup into “cube” data structure to retrieve pre_aggregated results.
  • 5. - 5 MOLAP Implementations  No standard query language for querying MOLAP - No SQL !  Vendors provide proprietary languages allowing business users to create queries that involve pivots, drilling down, or rolling up. - E.g. MDX of Microsoft - Languages generally involve extensive visual (click and drag) support. - Application Programming Interface (API)’s also provided for probing the cubes.
  • 6. - 6 Aggregations in MOLAP  Sales volume as a function of (i) product, (ii) time, and (iii) geography  A cube structure created to handle this. Dimensions: Product, Geography, Time Industry Category Product Hierarchical summarization paths Product Time w1 w2 w3 w4 w5 w6 Milk Bread Eggs Butter Jam Juice N E W S 12 13 45 8 23 10 Province Division District City Zone Year Quarter Month Week Day
  • 7. - 7 Cube operations  Drill down: get more details  e.g., given summarized sales as above, find breakup of sales by city within each region, or within Sindh  Rollup: summarize data  e.g., given sales data, summarize sales for last year by product category and region  Slice and dice: select and project  e.g.: Sales of soft-drinks in Karachi during last quarter  Pivot: change the view of data
  • 8. - 8 Drill-down - 2,000 4,000 6,000 8,000 10,000 12,000 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 OJ RK 8UP PK MJ BU AJ 2001 2002 Querying the cube - 5,000 10,000 15,000 20,000 25,000 30,000 35,000 40,000 2001 2002 Juices Soda Drinks - 2,000 4,000 6,000 8,000 10,000 12,000 14,000 Q1 Q2 Q3 Q4 Q1 Q2 Q3 Q4 Juices Soda Drinks 2001 2002 Drill-Down Roll-Up
  • 9. - 9 Querying the cube: Pivoting - 5,000 10,000 15,000 20,000 25,000 30,000 35,000 40,000 2001 2002 Juices Soda Drinks - 2,000 4,000 6,000 8,000 10,000 12,000 14,000 16,000 18,000 Orange juice Mango juice Apple juice Rola- Kola 8-UP Bubbly- UP Pola- Kola 2001 2002
  • 10. - 10 MOLAP evaluation Advantages of MOLAP:  Instant response (pre-calculated aggregates).  Impossible to ask question without an answer.  Value added functions (ranking, % change).
  • 11. - 11 MOLAP evaluation Drawbacks of MOLAP:  Long load time ( pre-calculating the cube may take days!).  Very sparse cube (wastage of space) for high cardinality (sometimes in small hundreds). e.g. number of heaters sold in Jacobabad or Sibi.
  • 12. - 12 MOLAP Implementation issues Maintenance issue: Every data item received must be aggregated into every cube (assuming “to-date” summaries are maintained). Lot of work. Storage issue: As dimensions get less detailed (e.g., year vs. day) cubes get much smaller, but storage consequences for building hundreds of cubes can be significant. Lot of space.
  • 13. - 13 Partitioned Cubes  To overcome the space limitation of MOLAP, the cube is partitioned.  The divide&conquer cube partitioning approach helps alleviate the scalability limitations of MOLAP implementation.  One logical cube of data can be spread across multiple physical cubes on separate (or same) servers.  Ideal cube partitioning is completely invisible to end users.  Performance degradation does occurs in case of a join across partitioned cubes.
  • 14. - 14 Partitioned Cubes: How it looks Like? Time Geography Men’s clothing Children clothing Bed linen Sales data cube partitioned at a major cotton products sale outlet Product
  • 15. - 15 Virtual Cubes Used to query two dissimilar cubes by creating a third “virtual” cube by a join between two cubes.  Logically similar to a relational view i.e. linking two (or more) cubes along common dimension(s).  Biggest advantage is saving in space by eliminating storage of redundant information. Example: Joining the store cube and the list price cube along the product dimension, to calculate the sale price without redundant storage of the sale price data.
  • 17. - 17 Why ROLAP? Issue of scalability i.e. curse of dimensionality for MOLAP  Deployment of significantly large dimension tables as compared to MOLAP using secondary storage.  Aggregate awareness allows using pre-built summary tables by some front-end tools.  Star schema designs usually used to facilitate ROLAP querying (in next lecture).
  • 18. - 18 ROLAP as a “Cube”  OLAP data is stored in a relational database (e.g. a star schema)  The fact table is a way of visualizing as a “un-rolled” cube.  So where is the cube?  It’s a matter of perception  Visualize the fact table as an elementary cube. Product Time 500Z1P2M2 250Z1P1M1 Sale K Rs.ZoneProductMonth Fact Table
  • 19. - 19 How to create “Cube” in ROLAP  Cube is a logical entity containing values of a certain fact at a certain aggregation level at an intersection of a combination of dimensions.  The following table can be created using 3 queries SUM (Sales_Amt) M1 M2 M3 ALL P1 P2 P3 Total Month_ID Product_ID
  • 20. - 20  For the table entries, without the totals SELECT S.Month_Id, S.Product_Id, SUM(S.Sales_Amt) FROM Sales GROUP BY S.Month_Id, S.Product_Id;  For the row totals SELECT S.Product_Id, SUM (Sales_Amt) FROM Sales GROUP BY S.Product_Id;  For the column totals SELECT S.Month_Id, SUM (Sales) FROM Sales GROUP BY S.Month_Id; How to create “Cube” in ROLAP using SQL
  • 21. - 21 CUBE Clause  The CUBE clause is part of SQL:1999  GROUP BY CUBE (v1, v2, …, vn)  Equivalent to a collection of GROUP BYs, one for each of the subsets of v1, v2, …, vn
  • 22. - 22 ROLAP & Space Requirement If one is not careful, with the increase in number of dimensions, the number of summary tables gets very large.
  • 23. - 23 ROLAP Issues  Maintenance.  Non standard hierarchy of dimensions.  Non standard conventions. Aggregation pit-falls.
  • 24. - 24  Maximum performance boost implies using lots of disk space for storing every pre- calculation.  Minimum performance boost implies no disk space with zero pre-calculation.  Using meta data to determine best level of pre-aggregation from which all other aggregates can be computed. Performance vs. Space Trade-Off
  • 25. Performance vs. Space Trade-off using Wizard 20 40 60 80 100 2 4 6 8   MB %Gain Aggregation answers most queries Aggregation answers few queries - 25
  • 26. - 26 HOLAP  Target is to get the best of both worlds.  HOLAP (Hybrid OLAP) allow co-existence of pre-built MOLAP cubes alongside relational OLAP or ROLAP structures.
  • 27. - 27 DOLAP Cube on the remote server Local Machine/Server Subset of the cube is transferred to the local machine