SlideShare a Scribd company logo
Lecture
OLAP Implementation TechniquesOLAP Implementation TechniquesOLAP Implementation TechniquesOLAP Implementation Techniques
Aggregation 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
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
Cube Operations
Querying the Cube
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
-
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
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
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.
MOLAP Implementations
Need to consider both maintenance and storage implications
when designing strategy for when to build cubes.
Maintenance Considerations: Every data item received into
MDD must be aggregated into every cube (assuming “to-date”
summaries are maintained).
Storage Considerations: Although cubes get much smaller
(e.g., more dense) as dimensions get less detailed (e.g., year
vs. day), storage implications for building hundreds of cubes
can be significant.
MOLAP Implementations
Virtual cubes are used when there is a need to join information from
two dissimilar cubes that share one or more common dimensions.
Similar to a relational view; two (or more) cubes are linked along
common dimension (s).
Often used to save space by eliminating redundant storage of
information.
Example: Build a list price cube that can be used to compute
discounts given across many stores in a retail chain without
redundant storage of the list price data through use of a virtual
cube.
Virtual Cubes
Typically outperform relational database technology because all answers
are pre-computed into cubes.
Difficult to scale because of combinatorial explosion in the number and
size of cubes when dimensions of significant cardinality are required.
Beyond tens (sometimes small hundreds) of thousands of entries in a
single dimension will break the MOLAP model because the pre-
computed cube model does not work well when the cubes are very
sparse in the population of individual cells.
See www.olapreport.com/DataExplosion.htm
MOLAP Implementations
What is ROLAP?
Why ROLAP?
How to implement ROLAP
ROLAP
Advances in database technologies and front-end tools have begun to
allow deployment of OLAP usingANSI SQL RDBMS implementations.
ROLAP facilitates deployment of much larger dimension tables than
MOLAP implementations.
Front-end tools to facilitate GUI access to multi-dimensional analysis
capabilities.
Aggregate awareness allows exploitation of pre-built summary tables for
some front-end tools.
Star schema designs are often used to facilitate OLAP against relational
databases.
ROLAP Implementations
Data Cube Schema
( a multidimensional array of summaries)( a multidimensional array of summaries)( a multidimensional array of summaries)( a multidimensional array of summaries)
SALES
Store ID
Time ID
Product ID
Customer ID
Unit Sales
Store Cost
Store Sales
STORE
Store ID
Store Name
Store City
Store State
Store Country
TIME
Time ID
Month
Quarter
Year
PRODUCT
Product Class ID
Product ID
Brand Name
CUSTOMER
Customer ID
Last Name
City
State
Country
PRODUCT CLASS
Product Class ID
Product Category
Product Subcategory
Time: Month → Quarter → Year → (all)
Store: Name → City → State → Country → (all)
Product: Brand Name → Subcategory → Category → (all)
Customer: Last Name → City → State → Country → (all)
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).
Why ROLAP?
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.
ROLAP as a “Cube”
Product
Time
500Z1P2M2
250Z1P1M1
Sale K Rs.ZoneProductMonth
FactTable
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
How to Create Cube in ROLAP?
SUM
(Sales_Amt)
M1 M2 M3 ALL
P1
P2
P3
Total
Month_ID
Product_ID
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?
Number of required queries increases exponentially with the
increase in number of dimensions.
Its wasteful to compute all queries.
In the example, the first query can do most of the work of the other
two queries
If we could save that result and aggregate over Month_Id and
Product_Id, we could compute the other queries more efficiently
Problem with Simple Approach
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
Cube Clause in SQL

More Related Content

Viewers also liked

Three Post - Media Production Capabilities
Three Post - Media Production CapabilitiesThree Post - Media Production Capabilities
Three Post - Media Production Capabilities
Three Post
 
Ici final project report
Ici final project reportIci final project report
Ici final project reportJıa Yıı
 
Cs437 lecture 16-18
Cs437 lecture 16-18Cs437 lecture 16-18
Cs437 lecture 16-18
Aneeb_Khawar
 
第I550537號發明專利_自助式加油系統及其自助式加油之方法
第I550537號發明專利_自助式加油系統及其自助式加油之方法第I550537號發明專利_自助式加油系統及其自助式加油之方法
第I550537號發明專利_自助式加油系統及其自助式加油之方法
Max Chang
 
Creative, Digital & Design Business Briefing — October 2015
Creative, Digital & Design Business Briefing — October 2015Creative, Digital & Design Business Briefing — October 2015
Creative, Digital & Design Business Briefing — October 2015
The Knowledge Transfer Network Creative, Digital & Design
 
Engranajes fotos
Engranajes fotosEngranajes fotos
Engranajes fotos
Juan Carlos Pingus C Pingus
 
Eq resistant bldg in rural area
Eq resistant bldg in rural areaEq resistant bldg in rural area
Eq resistant bldg in rural area
ersunilsoni
 
Programme on Strategic Management and Management of Change
Programme on Strategic Management and Management of ChangeProgramme on Strategic Management and Management of Change
Programme on Strategic Management and Management of Change
vamnicom123
 
What is Bitcoin Currency
What is Bitcoin CurrencyWhat is Bitcoin Currency
What is Bitcoin Currency
nasim12
 
JIRLGIRL August collection
JIRLGIRL August collectionJIRLGIRL August collection
JIRLGIRL August collection
Jirl Girl
 
PKN tentang Rakyat :)
PKN tentang Rakyat :)PKN tentang Rakyat :)
PKN tentang Rakyat :)ichaa17
 
Cs437 lecture 13
Cs437 lecture 13Cs437 lecture 13
Cs437 lecture 13
Aneeb_Khawar
 
Developing for Windows 8 based devices
Developing for Windows 8 based devicesDeveloping for Windows 8 based devices
Developing for Windows 8 based devices
Aneeb_Khawar
 
Ramya mmwt
Ramya mmwtRamya mmwt
Ramya mmwt
Ramya Aggarwal
 

Viewers also liked (16)

Three Post - Media Production Capabilities
Three Post - Media Production CapabilitiesThree Post - Media Production Capabilities
Three Post - Media Production Capabilities
 
Ici final project report
Ici final project reportIci final project report
Ici final project report
 
Cs437 lecture 16-18
Cs437 lecture 16-18Cs437 lecture 16-18
Cs437 lecture 16-18
 
第I550537號發明專利_自助式加油系統及其自助式加油之方法
第I550537號發明專利_自助式加油系統及其自助式加油之方法第I550537號發明專利_自助式加油系統及其自助式加油之方法
第I550537號發明專利_自助式加油系統及其自助式加油之方法
 
Creative, Digital & Design Business Briefing — October 2015
Creative, Digital & Design Business Briefing — October 2015Creative, Digital & Design Business Briefing — October 2015
Creative, Digital & Design Business Briefing — October 2015
 
Engranajes fotos
Engranajes fotosEngranajes fotos
Engranajes fotos
 
Eq resistant bldg in rural area
Eq resistant bldg in rural areaEq resistant bldg in rural area
Eq resistant bldg in rural area
 
Creative Business Development Briefing - November 2014
Creative Business Development Briefing - November 2014Creative Business Development Briefing - November 2014
Creative Business Development Briefing - November 2014
 
Programme on Strategic Management and Management of Change
Programme on Strategic Management and Management of ChangeProgramme on Strategic Management and Management of Change
Programme on Strategic Management and Management of Change
 
Tik1
Tik1Tik1
Tik1
 
What is Bitcoin Currency
What is Bitcoin CurrencyWhat is Bitcoin Currency
What is Bitcoin Currency
 
JIRLGIRL August collection
JIRLGIRL August collectionJIRLGIRL August collection
JIRLGIRL August collection
 
PKN tentang Rakyat :)
PKN tentang Rakyat :)PKN tentang Rakyat :)
PKN tentang Rakyat :)
 
Cs437 lecture 13
Cs437 lecture 13Cs437 lecture 13
Cs437 lecture 13
 
Developing for Windows 8 based devices
Developing for Windows 8 based devicesDeveloping for Windows 8 based devices
Developing for Windows 8 based devices
 
Ramya mmwt
Ramya mmwtRamya mmwt
Ramya mmwt
 

Similar to Cs437 lecture 10-12

Intro to Data warehousing Lecture 06
Intro to Data warehousing   Lecture 06Intro to Data warehousing   Lecture 06
Intro to Data warehousing Lecture 06
AnwarrChaudary
 
Dwh lecture slides-week 12&13
Dwh lecture slides-week 12&13Dwh lecture slides-week 12&13
Dwh lecture slides-week 12&13
Shani729
 
Intro to Data warehousing lecture 07
Intro to Data warehousing   lecture 07Intro to Data warehousing   lecture 07
Intro to Data warehousing lecture 07
AnwarrChaudary
 
OLAPCUBE.pptx
OLAPCUBE.pptxOLAPCUBE.pptx
OLAPCUBE.pptx
DrJANANIA1
 
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALADATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
Saikiran Panjala
 
DWO -Pertemuan 1
DWO -Pertemuan 1DWO -Pertemuan 1
DWO -Pertemuan 1
Abrianto Nugraha
 
mod 2.pdf
mod 2.pdfmod 2.pdf
86921864 olap-case-study-vj
86921864 olap-case-study-vj86921864 olap-case-study-vj
86921864 olap-case-study-vj
homeworkping4
 
OLAP Cubes in Datawarehousing
OLAP Cubes in DatawarehousingOLAP Cubes in Datawarehousing
OLAP Cubes in Datawarehousing
Prithwis Mukerjee
 
OLAP Basics and Fundamentals by Bharat Kalia
OLAP Basics and Fundamentals by Bharat Kalia OLAP Basics and Fundamentals by Bharat Kalia
OLAP Basics and Fundamentals by Bharat Kalia
Bharat Kalia
 
Data Warehouse
Data WarehouseData Warehouse
Data Warehouseganblues
 
CS636-olap.ppt
CS636-olap.pptCS636-olap.ppt
CS636-olap.ppt
Iftikharbaig7
 
OLAP
OLAPOLAP
Project report aditi paul1
Project report aditi paul1Project report aditi paul1
Project report aditi paul1
guest9529cb
 
OLAP in Data Warehouse
OLAP in Data WarehouseOLAP in Data Warehouse
OLAP in Data Warehouse
SOMASUNDARAM T
 
Dan Querimit - BI Portfolio
Dan Querimit - BI PortfolioDan Querimit - BI Portfolio
Dan Querimit - BI Portfolioquerimit
 
Self-serve analytics journey at Celtra: Snowflake, Spark, and Databricks
Self-serve analytics journey at Celtra: Snowflake, Spark, and DatabricksSelf-serve analytics journey at Celtra: Snowflake, Spark, and Databricks
Self-serve analytics journey at Celtra: Snowflake, Spark, and Databricks
Grega Kespret
 

Similar to Cs437 lecture 10-12 (20)

Intro to Data warehousing Lecture 06
Intro to Data warehousing   Lecture 06Intro to Data warehousing   Lecture 06
Intro to Data warehousing Lecture 06
 
Dwh lecture slides-week 12&13
Dwh lecture slides-week 12&13Dwh lecture slides-week 12&13
Dwh lecture slides-week 12&13
 
Intro to Data warehousing lecture 07
Intro to Data warehousing   lecture 07Intro to Data warehousing   lecture 07
Intro to Data warehousing lecture 07
 
OLAPCUBE.pptx
OLAPCUBE.pptxOLAPCUBE.pptx
OLAPCUBE.pptx
 
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALADATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
DATA WAREHOUSE IMPLEMENTATION BY SAIKIRAN PANJALA
 
DWO -Pertemuan 1
DWO -Pertemuan 1DWO -Pertemuan 1
DWO -Pertemuan 1
 
mod 2.pdf
mod 2.pdfmod 2.pdf
mod 2.pdf
 
86921864 olap-case-study-vj
86921864 olap-case-study-vj86921864 olap-case-study-vj
86921864 olap-case-study-vj
 
OLAP Cubes in Datawarehousing
OLAP Cubes in DatawarehousingOLAP Cubes in Datawarehousing
OLAP Cubes in Datawarehousing
 
OLAP Basics and Fundamentals by Bharat Kalia
OLAP Basics and Fundamentals by Bharat Kalia OLAP Basics and Fundamentals by Bharat Kalia
OLAP Basics and Fundamentals by Bharat Kalia
 
Data Warehouse
Data WarehouseData Warehouse
Data Warehouse
 
3dw
3dw3dw
3dw
 
CS636-olap.ppt
CS636-olap.pptCS636-olap.ppt
CS636-olap.ppt
 
Dwh faqs
Dwh faqsDwh faqs
Dwh faqs
 
OLAP
OLAPOLAP
OLAP
 
3dw
3dw3dw
3dw
 
Project report aditi paul1
Project report aditi paul1Project report aditi paul1
Project report aditi paul1
 
OLAP in Data Warehouse
OLAP in Data WarehouseOLAP in Data Warehouse
OLAP in Data Warehouse
 
Dan Querimit - BI Portfolio
Dan Querimit - BI PortfolioDan Querimit - BI Portfolio
Dan Querimit - BI Portfolio
 
Self-serve analytics journey at Celtra: Snowflake, Spark, and Databricks
Self-serve analytics journey at Celtra: Snowflake, Spark, and DatabricksSelf-serve analytics journey at Celtra: Snowflake, Spark, and Databricks
Self-serve analytics journey at Celtra: Snowflake, Spark, and Databricks
 

Recently uploaded

Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
Opendatabay
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
axoqas
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
pchutichetpong
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
NABLAS株式会社
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
v3tuleee
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
Tiktokethiodaily
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
ewymefz
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
ewymefz
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
nscud
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
AbhimanyuSinha9
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
John Andrews
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
haila53
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
NABLAS株式会社
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Subhajit Sahu
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
ewymefz
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
Oppotus
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
ewymefz
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
MaleehaSheikh2
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
benishzehra469
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
vcaxypu
 

Recently uploaded (20)

Opendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptxOpendatabay - Open Data Marketplace.pptx
Opendatabay - Open Data Marketplace.pptx
 
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
做(mqu毕业证书)麦考瑞大学毕业证硕士文凭证书学费发票原版一模一样
 
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
Data Centers - Striving Within A Narrow Range - Research Report - MCG - May 2...
 
社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .社内勉強会資料_LLM Agents                              .
社内勉強会資料_LLM Agents                              .
 
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理一比一原版(UofS毕业证书)萨省大学毕业证如何办理
一比一原版(UofS毕业证书)萨省大学毕业证如何办理
 
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
1.Seydhcuxhxyxhccuuxuxyxyxmisolids 2019.pptx
 
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
一比一原版(IIT毕业证)伊利诺伊理工大学毕业证成绩单
 
一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单一比一原版(NYU毕业证)纽约大学毕业证成绩单
一比一原版(NYU毕业证)纽约大学毕业证成绩单
 
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
一比一原版(CBU毕业证)卡普顿大学毕业证成绩单
 
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...Best best suvichar in gujarati english meaning of this sentence as Silk road ...
Best best suvichar in gujarati english meaning of this sentence as Silk road ...
 
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
Chatty Kathy - UNC Bootcamp Final Project Presentation - Final Version - 5.23...
 
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdfCh03-Managing the Object-Oriented Information Systems Project a.pdf
Ch03-Managing the Object-Oriented Information Systems Project a.pdf
 
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
【社内勉強会資料_Octo: An Open-Source Generalist Robot Policy】
 
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
Levelwise PageRank with Loop-Based Dead End Handling Strategy : SHORT REPORT ...
 
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
一比一原版(UofM毕业证)明尼苏达大学毕业证成绩单
 
Q1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year ReboundQ1’2024 Update: MYCI’s Leap Year Rebound
Q1’2024 Update: MYCI’s Leap Year Rebound
 
一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单一比一原版(BU毕业证)波士顿大学毕业证成绩单
一比一原版(BU毕业证)波士顿大学毕业证成绩单
 
FP Growth Algorithm and its Applications
FP Growth Algorithm and its ApplicationsFP Growth Algorithm and its Applications
FP Growth Algorithm and its Applications
 
Empowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptxEmpowering Data Analytics Ecosystem.pptx
Empowering Data Analytics Ecosystem.pptx
 
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
一比一原版(RUG毕业证)格罗宁根大学毕业证成绩单
 

Cs437 lecture 10-12

  • 1. Lecture OLAP Implementation TechniquesOLAP Implementation TechniquesOLAP Implementation TechniquesOLAP Implementation Techniques
  • 2. Aggregation 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
  • 3. 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 Cube Operations
  • 4. Querying the Cube 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 - 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
  • 5. 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
  • 6. 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. MOLAP Implementations
  • 7. Need to consider both maintenance and storage implications when designing strategy for when to build cubes. Maintenance Considerations: Every data item received into MDD must be aggregated into every cube (assuming “to-date” summaries are maintained). Storage Considerations: Although cubes get much smaller (e.g., more dense) as dimensions get less detailed (e.g., year vs. day), storage implications for building hundreds of cubes can be significant. MOLAP Implementations
  • 8. Virtual cubes are used when there is a need to join information from two dissimilar cubes that share one or more common dimensions. Similar to a relational view; two (or more) cubes are linked along common dimension (s). Often used to save space by eliminating redundant storage of information. Example: Build a list price cube that can be used to compute discounts given across many stores in a retail chain without redundant storage of the list price data through use of a virtual cube. Virtual Cubes
  • 9. Typically outperform relational database technology because all answers are pre-computed into cubes. Difficult to scale because of combinatorial explosion in the number and size of cubes when dimensions of significant cardinality are required. Beyond tens (sometimes small hundreds) of thousands of entries in a single dimension will break the MOLAP model because the pre- computed cube model does not work well when the cubes are very sparse in the population of individual cells. See www.olapreport.com/DataExplosion.htm MOLAP Implementations
  • 10. What is ROLAP? Why ROLAP? How to implement ROLAP ROLAP
  • 11. Advances in database technologies and front-end tools have begun to allow deployment of OLAP usingANSI SQL RDBMS implementations. ROLAP facilitates deployment of much larger dimension tables than MOLAP implementations. Front-end tools to facilitate GUI access to multi-dimensional analysis capabilities. Aggregate awareness allows exploitation of pre-built summary tables for some front-end tools. Star schema designs are often used to facilitate OLAP against relational databases. ROLAP Implementations
  • 12. Data Cube Schema ( a multidimensional array of summaries)( a multidimensional array of summaries)( a multidimensional array of summaries)( a multidimensional array of summaries) SALES Store ID Time ID Product ID Customer ID Unit Sales Store Cost Store Sales STORE Store ID Store Name Store City Store State Store Country TIME Time ID Month Quarter Year PRODUCT Product Class ID Product ID Brand Name CUSTOMER Customer ID Last Name City State Country PRODUCT CLASS Product Class ID Product Category Product Subcategory Time: Month → Quarter → Year → (all) Store: Name → City → State → Country → (all) Product: Brand Name → Subcategory → Category → (all) Customer: Last Name → City → State → Country → (all)
  • 13. 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). Why ROLAP?
  • 14. 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. ROLAP as a “Cube” Product Time 500Z1P2M2 250Z1P1M1 Sale K Rs.ZoneProductMonth FactTable
  • 15. 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 How to Create Cube in ROLAP? SUM (Sales_Amt) M1 M2 M3 ALL P1 P2 P3 Total Month_ID Product_ID
  • 16. 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?
  • 17. Number of required queries increases exponentially with the increase in number of dimensions. Its wasteful to compute all queries. In the example, the first query can do most of the work of the other two queries If we could save that result and aggregate over Month_Id and Product_Id, we could compute the other queries more efficiently Problem with Simple Approach
  • 18. 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 Cube Clause in SQL