Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Lecture 11
1. Ahsan AbdullahAhsan Abdullah
11
Data WarehousingData Warehousing
Lecture-11Lecture-11
Multidimensional OLAP (MOLAP)Multidimensional OLAP (MOLAP)
Virtual University of PakistanVirtual University of Pakistan
Ahsan Abdullah
Assoc. Prof. & Head
Center for Agro-Informatics Research
www.nu.edu.pk/cairindex.asp
National University of Computers & Emerging Sciences, Islamabad
Email: ahsan@cluxing.com
3. Ahsan Abdullah
3
OLAP ImplementationsOLAP Implementations
1.1. MOLAP:MOLAP: OLAP implemented with a multi-OLAP implemented with a multi-
dimensional data structure.dimensional data structure.
2.2. ROLAP:ROLAP: OLAP implemented with a relationalOLAP implemented with a relational
database.database.
3.3. HOLAP:HOLAP: OLAP implemented as a hybrid ofOLAP implemented as a hybrid of
MOLAP and ROLAP.MOLAP and ROLAP.
4.4. DOLAP:DOLAP: OLAP implemented for desktop decisionOLAP implemented for desktop decision
support environments.support environments.
4. Ahsan Abdullah
4
MOLAP ImplementationsMOLAP Implementations
OLAP has historically been implemented using aOLAP has historically been implemented using a
multi_dimensional data structure or “cube”.multi_dimensional data structure or “cube”.
Dimensions are key business factors for analysis:Dimensions are key business factors for analysis:
GeographiesGeographies (city, district, division, province,...)(city, district, division, province,...)
ProductsProducts (item, product category, product department,...)(item, product category, product department,...)
DatesDates (day, week, month, quarter, year,...)(day, week, month, quarter, year,...)
Very high performance achieved by O(1) timeVery high performance achieved by O(1) time
lookup into “cube” data structure to retrievelookup into “cube” data structure to retrieve
pre_aggregated results.pre_aggregated results.
5. Ahsan Abdullah
5
MOLAP ImplementationsMOLAP Implementations
No standard query language for querying MOLAPNo standard query language for querying MOLAP
- No SQL !No SQL !
Vendors provide proprietary languages allowingVendors provide proprietary languages allowing
business users to create queries that involve pivots,business users to create queries that involve pivots,
drilling down, or rolling up.drilling down, or rolling up.
- E.g. MDX of MicrosoftE.g. MDX of Microsoft
- Languages generally involve extensive visual (click andLanguages generally involve extensive visual (click and
drag) support.drag) support.
- Application Programming Interface (API)’s also providedApplication Programming Interface (API)’s also provided
for probing the cubes.for probing the cubes.
6. Ahsan Abdullah
6
Aggregations in MOLAPAggregations in MOLAP
Sales volume as a function of (i) product, (ii) time,Sales volume as a function of (i) product, (ii) time,
and (iii) geographyand (iii) geography
A cube structure created to handle this.A cube structure created to handle this.
Dimensions: Product, Geography, Time
Industry
Category
Product
Hierarchical summarization pathsHierarchical summarization paths
Product
G
eog
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. Ahsan Abdullah
7
Cube operationsCube operations
Drill down: get more detailsDrill down: get more details
e.g., given summarized sales as above, find breakupe.g., given summarized sales as above, find breakup
of sales by city within each region, or within Sindhof sales by city within each region, or within Sindh
Rollup: summarize dataRollup: summarize data
e.g., given sales data, summarize sales for last yeare.g., given sales data, summarize sales for last year
by product category and regionby product category and region
Slice and dice: select and projectSlice and dice: select and project
e.g.: Sales of soft-drinks in Karachi during laste.g.: Sales of soft-drinks in Karachi during last
quarterquarter
Pivot: change the view of dataPivot: change the view of data
9. Ahsan Abdullah
9
Querying the cube: PivotingQuerying 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. Ahsan Abdullah
10
MOLAP evaluationMOLAP evaluation
Advantages of MOLAP:
Instant response (pre-calculated aggregates).
Impossible to ask question without an answer.
Value added functions (ranking, % change).
11. Ahsan Abdullah
11
MOLAP evaluationMOLAP 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. Ahsan Abdullah
12
MOLAP Implementation issuesMOLAP Implementation issues
Maintenance issue:Maintenance issue: Every data itemEvery data item
received must be aggregated intoreceived must be aggregated into everyevery cubecube
(assuming “to-date” summaries are(assuming “to-date” summaries are
maintained).maintained). Lot of work.Lot of work.
Storage issue:Storage issue: As dimensions get lessAs dimensions get less
detailed (e.g., year vs. day) cubes get muchdetailed (e.g., year vs. day) cubes get much
smaller, but storage consequences forsmaller, but storage consequences for
building hundreds of cubes can be significant.building hundreds of cubes can be significant.
Lot of space.Lot of space.
13. Ahsan Abdullah
13
Partitioned CubesPartitioned Cubes
To overcome the space limitation of MOLAP, the cube isTo overcome the space limitation of MOLAP, the cube is
partitioned.partitioned.
The divide&conquer cube partitioning approach helpsThe divide&conquer cube partitioning approach helps
alleviate the scalability limitations of MOLAPalleviate the scalability limitations of MOLAP
implementation.implementation.
One logical cube of data can be spread across multipleOne logical cube of data can be spread across multiple
physical cubes on separate (or same) servers.physical cubes on separate (or same) servers.
Ideal cube partitioning is completely invisible to endIdeal cube partitioning is completely invisible to end
users.users.
PerformancePerformance degradation does occursdegradation does occurs in case of a joinin case of a join
across partitioned cubes.across partitioned cubes.
14. Ahsan Abdullah
14
Partitioned Cubes: How it looks Like?Partitioned Cubes: How it looks Like?
Time
Geography
Men’s clothing
Children clothing
Bed linen
Sales data cube partitioned at a major cottonSales data cube partitioned at a major cotton
products sale outletproducts sale outlet
Product
15. Ahsan Abdullah
15
Virtual CubesVirtual Cubes
Used to query two dissimilar cubes by creating aUsed to query two dissimilar cubes by creating a
third “virtual” cube by a join between two cubes.third “virtual” cube by a join between two cubes.
Logically similar to a relational view i.e. linking twoLogically similar to a relational view i.e. linking two
(or more) cubes along common dimension(s).(or more) cubes along common dimension(s).
Biggest advantage is saving in space by eliminatingBiggest advantage is saving in space by eliminating
storage of redundant information.storage of redundant information.
Example:Example: Joining the store cube and the list priceJoining the store cube and the list price
cube along the product dimension, to calculate thecube along the product dimension, to calculate the
sale price without redundant storage of the salesale price without redundant storage of the sale
price data.price data.