Professional Documents
Culture Documents
A data cube in a data warehouse is a multidimensional structure used to store data. The data cube was
initially planned for the OLAP tools that could easily access the multidimensional data. But the data cube
can also be used for data mining.
In this section, we will discuss the term data cube along with its classification.
Further, we will discuss the operations that could be conducted on the data
cube. We will also discuss the benefits of using the data cube for storing data
in the data warehouse.
The dimensions of data cube are the attitude, angle or the entities with respect
to which the enterprise wants to store the data. Now, how does it help the
analyst to analyze and extract the data?
Let us take an example, consider we have data about AllElectronics sales. Here
we can store the sales data in many perspectives or dimensions like sales in all
time, sale at all branches, sales at all location, sales of all items. The figure
below shows the data cube for AllElectronics sales.
Data branch_code, branch_address etc.
The fact table has the data in numeric forms which denotes the numeric
measures such as a number of units of an item sold, sale of a particular branch
in a particular year, etc. Knowing data cube let us further move to the data
cube classification.
Data cube can be classified into two main categories as discussed below:
You can consider the relational data cube as the ‘extended version of relational
DBMS’. Relational tables are used to store data and each relational table
represents the dimension of a data cube.
To calculate the aggregated data relational data cube implements SQL but
when it comes to performance the relational data cube’s performance is slower
than the multidimensional data cube. But the relational data cube is scalable
for steadily increasing data.
You can even get the combination of both relational data cube as well as
multidimensional data cube which is termed as a hybrid data cube. The hybrid
data cube (HOLAP) retrieve features such as scalability from relational data
cube and it retrieves faster computation from multidimensional data cube.
1. Roll Up
Roll-up operation summarizes or aggregates the dimensions either by
performing dimension reduction or you can perform concept hierarchy.
The below figure shows you the example of a roll-up operation performed on
the location dimension of the data cube we have seen above.
2. Drill Down
When the drill-down operation is performed on any dimension the data on the
dimension is fragmented into granular form.
In the figure below you can see the drill-down operation on the time
dimension where the quarter Q1, Q2, is fragmented into months. Data cube
drill-down operation
3. Slice and Dice
The slice and dice operation pick up one dimension of the data cube and then forms a subcube out of it.
The figure below represents the slice operation on a data cube where the data cube is sliced based on
time.
Data cube slice operationThe dice operation select more than one dimension to form a subcube. Like in
thefigure below you can see that the subcube is formed by selecting the dimensions such as location,
items and time.