You are on page 1of 7

Data Warehousing and Data Mining

Prof. B. Valarmathi
Department of Software and Systems Engineering
School of Information Technology and Engineering
Vellore Institute of Technology, Vellore.

Week 2 - Unit 1
Lecture – 02
OLAP Operations

In this lecture, let us discuss OLAP Operations in data warehousing.

In the last lecture, we discussed the role of concept hierarchies and we learnt the
definition of concept hierarchy, Hierarchical and lattice structures of attributes,
schema hierarchy and set-grouping hierarchy.

At the end of this lecture, you will able to

1. Understand OLAP Operations


2. Define Roll-up, Drill-down, Slice, Dice, Pivot (rotate) Operations

There are five types of OLAP operations.

1. Roll-up
2. Drill-down
3. Slice
4. Dice
5. Pivot (rotate)

1) Roll-up:

Roll-up operation is the process aggregating the information in a data cube. This
is also known as consolidation on a data cube. The roll-up is carried out either
by moving up a concept hierarchy for a dimension or by reducing the
dimension.

Concept hierarchy is a system of grouping things based on their order or level.

Consider the following diagram. It has 3 dimensions and they are Item in types,
Time in quarters and Location in cities.

Now apply roll - up operation on Location from cities to countries in the given
data cube.
In this example, Chennai and Mumbai cities are consolidated into country India.
Similarly, Nagasaki and Hiroshima cities are aggregated into country Japan.

The sales figure of Chennai and Mumbai are 30 and 70 respectively. After roll-
up, they become 100. In this aggregation process, location hierarchy moves up
from city to country.

This is the final result of Roll-up operation of the given data cube.
In drill-down data is divided into smaller parts. This process is just the opposite
of the rollup process. It is done by either downward moving in the hierarchy or
by adding a new dimension.

Now apply drill - down operation on time from quarters to months in the given
data cube.

In this example, Quarter Q1 is drilled down to months January, February, and


March.

Quarter Q2 is drilled down to months April, May, and June.

Quarter Q3 is drilled down to months July, August, and September.

Quarter Q4 is drilled down to months October, November, and December.

The corresponding sales are also registered.

In this example, months are added.


SM

Drill - down operation on time from quarters to months is shown here.

This is the final result of Drill - down operation of the given data cube.

In the slice operation a new sub-cube is created by selecting one dimension.

The working mechanics of slicing operation is shown in the picture. Slice for
Time = “Q1”

The Time Dimension is sliced with Q1 as the filter and a new sub cube is
created.
Although the working mechanics of dice operation is similar to the slice
operation.

Here a new sub-cube is created by selecting 2 or more dimensions.

Pivot operation provides a substitute representation of the data by rotating the


data axes.

In the following example, the pivot is based on item types.


At the end of this lecture, you have discussed the OLAP operations and learnt
the five types of OLAP operations like Roll-up, Drill-down, Slice, Dice, Pivot
(rotate) Operations

Thank you.

You might also like