You are on page 1of 37

Data Warehouse-3

Roll Up

• Roll-up performs aggregation on a data cube in any of the following


ways −
• By climbing up a concept hierarchy for a dimension
• By dimension reduction
The OLAP Cube
• An OLAP Cube is a data structure that
allows fast analysis of data.

• The arrangement of data into cubes


overcomes a limitation of relational
databases.

• The OLAP cube consists of numeric facts


called measures which are categorized by
dimensions.
Data Cubes
Sample Data Cube
Classification of
OLAP Tools
• In order to provide the appropriate Analytic
Processing facility we have following
Classifications of OLAP:
– ROLAP (Relational OLAP)
– MOLAP (Multidimensional OLAP
– HOLAP (Hybrid OLAP)
– OTHER OLAP
- Desktop OLAP (DOLAP)
- Web OLAP (WOLAP)
- Mobile OLAP
R(Relational)OLAP

• Fastest growing style of OLAP


• Enables multi dimensional views of 2D
relational tables
• Relational OLAP servers are placed between
relational back-end server and client front-end
tools.
• To store and manage the warehouse data, the
relational OLAP uses relational or extended-
relational DBMS
R(Relational)OLAP
ROLAP Architecture

Info
Request
Database Server ROLAP
Server

SQL
Front End Tool

Meta Data
Request
Result Result
Processing
set Set
ROLAP & MOLAP
MOLAP
(Multidimensional OLAP)

• MOLAP uses array-based multidimensional


storage engines for multidimensional views of
data.
• With multidimensional data stores, the
storage utilization may be low if the data set is
sparse. Therefore, many MOLAP server use
two levels of data storage representation to
handle dense and sparse data sets.
MOLAP Architecture

Info
Load Request
Database Server MOLAP
Server

SQL
Front End Tool

Result
Meta Data
Request
Processing Result
Set
MOLAP Architecture
ROLAP & MOLAP
ROLAP & MOLAP
ROLAP and MOLAP
MOLAP vs ROLAP

MOLAP ROLAP

Information retrieval is fast. Information retrieval is


comparatively slow.
Uses sparse array to store data-sets. Uses relational table.
MOLAP is best suited for inexperienced users, ROLAP is best suited for
since it is very easy to use. experienced users.
Maintains a separate database for data cubes. It may not require space other
than available in the Data
warehouse.
DBMS facility is weak. DBMS facility is strong.
HOLAP
(Hybrid OLAP)

• Hybrid OLAP is a combination of both ROLAP and MOLAP.


• It offers higher scalability of ROLAP and faster computation of MOLAP.
• HOLAP servers allows to store the large data volumes of detailed
information. The aggregations are stored separately in MOLAP store.
OLAP Operations

• As we know in an OLAP Server (OLAP Cube) information is pre-


calculated in advance for further analysis.
• The BASIC ANALYTICAL Operations on OLAP:
1) Roll-up
2) Drill-down
3) Slice
4) Dice
5) Pivot (rotate)
OLAP Operations

• The BASIC ANALYTICAL Operations on OLAP: (Cont..)


1) The roll-up operation (also known as drill-up or
aggregation or Consolidation operation) performs
aggregation on a data cube, by climbing down
concept hierarchies, i.e., dimension reduction. Roll-
up is like zooming-out on the data cubes.
OLAP Operations

https://www.javatpoint.com/olap-operations
OLAP Operations

• Drill Down: The drill-down operation (also called roll-


down) is the reverse operation of roll-up.
• Drill-down is like zooming-in on the data cube.
• It navigates from less detailed record to more detailed data.
• Drill-down can be performed by either stepping down a
concept hierarchy for a dimension or adding additional
dimensions.
OLAP Operations
OLAP Operations

• SLICE: A slice is a subset of the cubes corresponding to a


single value for one or more members of the dimension.
• For example, a slice operation is executed when the customer
wants a selection on one dimension of a three-dimensional
cube resulting in a two-dimensional site. So, the Slice
operations perform a selection on one dimension of the given
cube, thus resulting in a sub-cube.
OLAP Operations
OLAP Operations

• DICE:
- The dice operation describes a sub-cube by operating a
selection (operation) on two or more dimension.

The dice operation on the cubes based on the following selection


criteria involves three dimensions.
• (location = "Toronto" or "Vancouver")
• (time = "Q1" or "Q2")
• (item =" Mobile" or "Modem")
OLAP Operations
OLAP Operations

Pivot
• The pivot operation is also called a rotation.
• Pivot is a visualization operations which rotates the data axes
in view to provide an alternative presentation of the data.
• It may contain swapping the rows and columns or moving one
of the row-dimensions into the column dimensions.
OLAP Operations
Reading Assignment:
Another Example

• Suppose
The participants of following cities won the given medals
Location Medal
Islamabad 5
New York 2
Karachi 3
Los Angeles 5
Perform OLAP Operatons
Roll-up (drill-up)

• The roll-up operation performs aggregation on a data cube either by


climbing up the hierarchy or by dimension reduction.
• More detailed data to less detailed data.

Location Medal
Pakistan 8
USA 7
Drill-down:-

• Drill-down is the reverse of roll-up. That means lower level summary to


higher level summary.

• Drill-down can be performed either by:


1. Stepping down a concept hierarchy for a dimension
2. By introducing a new dimension.
Drill-down

• Drill-down on Location form countries to cities to the following


Location Medal
Pakistan 8
USA 7

After Drill Down

Location Medal
Islamabad 5
New York 2
Karachi 3
Los Angeles 5

Less detailed data to More detailed data.


Slice and dice

• The slice operation performs a selection on one dimension of the given


cube, resulting in a subcube.

• Reduces the dimensionality of the cubes.


Slice and dice

• For example, if we want to make a select where Medal = 5


Slice Operation

Location Medal
Islamabad 5
Los Angeles 5
Slice and dice

• The dice operation defines a sub-cube by performing a selection on two


or more dimensions.
• For example, if we want to make a select where Medal = 3 or Location =
New York

Dice Operation

Location Medal
New York 2
Karachi 3
Pivot

• Pivot is also known as rotate. It Rotates the data axis to view the data
from different perspectives.

You might also like