4 Data Cube Technology

Data Warehousing and Data Mining · Unit 4 · 4 hrs

Data Cube Technology

Exam-focused notes for Data Cube Technology (Data Warehousing and Data Mining, CSC420): what the TU syllabus asks and how it has actually been tested, with 7 solved past questions from this unit.

Data Cube Technology in short

Precomputing a data cube can dramatically cut the response time of an OLAP query, but computing and storing every possible aggregate can just as easily exhaust available memory. This unit covers how a cube's cuboids are organized and materialized, the general strategies used to compute them efficiently, and the query-oriented alternative to cube precomputation, attribute-oriented induction, used to compare one class of data against another.

Data Cube Technology: notes

Efficient method for data cube computation

Data cube computation is an essential task in building a data warehouse. Precomputing all or part of a cube greatly reduces the response time of an OLAP query and improves overall performance, but the computation itself is challenging because a cube's aggregates can require huge amounts of computation time and storage space to produce and hold.

Cube materialization (Introduction to Full cube, Iceberg cube, Closed cube, Shell cube)

A data cube over $n$ dimensions is a lattice of cuboids: each cuboid corresponds to one possible group-by over a subset of the dimensions. For dimensions $A$, $B$, $C$ and measure $M$, the lattice runs from the base cuboid $ABC$, the least generalized, most detailed cuboid, which groups by all three dimensions, up through the two-dimensional group-bys $AB$, $AC$, $BC$ and the one-dimensional group-bys $A$, $B$, $C$, to the apex cuboid, written $\mathit{all}$, the most generalized cuboid, holding a single overall aggregate value. Moving from the apex cuboid downward through the lattice is a drill-down; moving from the base cuboid upward is a roll-up.

Because materializing every cuboid can be prohibitively expensive, four strategies are used depending on how much of the lattice is actually precomputed.

A full cube precomputes every cell in every cuboid. A cube over $n$ dimensions has $2^n$ cuboids, since each dimension is either included in a given group-by or aggregated away, giving two choices per dimension; concept hierarchies on the dimensions multiply this further. For example a cube over 4 dimensions has $2^4 = 16$ cuboids, and a cube over 10 dimensions already has $2^{10} = 1024$, which is why full materialization needs huge amounts of memory as the number of dimensions grows.

What this unit covers

  • Efficient method for data cube computation
  • Cube materialization (Introduction to Full cube, Iceberg cube, Closed cube, Shell cube)
  • General strategies for cube computation
  • Attribute oriented induction for data characterization
  • Mining class comparison
  • Discriminating between different classes

General strategies for cube computation

2081 · 5 marks

Explain the general strategies for cube computation. [5]

Data cube computation is an essential task in data warehouse implementation. The precomputation of all or part of a data cube can greatly reduce response time and enhance the performance of OLAP. However, it is challenging because it may require huge computational time and storage space. There ar...

Open this answer on its own page →

2076 · 5 marks

Explain the optimization techniques in data cube computation. [5]

Data cube computation is an essential task in data warehouse implementation. Precomputing all or part of a data cube can greatly reduce response time and enhance OLAP performance. However, it is challenging because it may require huge computational time and storage space. Optimization techniques ...

Open this answer on its own page →

Attribute oriented induction for data characterization

2081 · 5 marks

Distinguish between data characterization and data discrimination. What are the challenges of multimedia mining? [5]

--- Both are descriptive data mining functions used to summarize and compare data. They are distinguished as follows: Aspect Data Characterization Data Discrimination --------- Definition Summarization of the general characteristics or features of a target class of data Comparison of the general ...

Open this answer on its own page →

Cube materialization

2080 · 5 marks

How many cuboids are possible from 5-dimensional data? Discuss the concept of full cube and iceberg cube. [5]

Show solved answer

Cuboids from 5-Dimensional Data, Full Cube, and Iceberg Cube

Given

  • Number of dimensions: $n = 5$
  • (No concept hierarchies specified, so we assume one level per dimension.)

Solution

Number of Cuboids

A data cube of $n$ dimensions (without concept hierarchies) contains $2^n$ cuboids, because each dimension can either be included or excluded from a given group-by.

$$\text{Number of cuboids} = 2^n = 2^5 = 32$$

Breakdown by level (using dimensions A, B, C, D, E):

LevelNo. of Cuboids$\binom{5}{k}$Examples
5-D (Base)1$\binom{5}{5}$ABCDE
4-D5$\binom{5}{4}$ABCD, ABCE, ABDE, ACDE, BCDE
3-D10$\binom{5}{3}$ABC, ABD, ...
2-D10$\binom{5}{2}$AB, AC, ...
1-D5$\binom{5}{1}$A, B, C, D, E
0-D (Apex)1$\binom{5}{0}$( ) = "all"
Total32$2^5$
  • The base cuboid (ABCDE) is the least generalized and holds the most detailed data.
  • The apex cuboid (0-D) is the most generalized, holding a single aggregate value.

Note: If each dimension had an associated concept hierarchy with $L_i$ levels, the total would instead be $\prod_{i=1}^{n}(L_i + 1)$. With no hierarchy given, the answer is $2^5 = 32$.


Full Cube

A full cube is a data cube in which all cuboids (all $2^n$ group-by combinations) and all their cells are precomputed and materialized in advance.

  • For 5 dimensions, all 32 cuboids are precomputed.
  • Advantage: Queries are answered very fast, since every aggregation is already available.
  • Disadvantage: Requires very large storage and computation; grows explosively with dimensions and concept hierarchies, making it impractical for high-dimensional or sparse data.

Iceberg Cube

An iceberg cube is a partially materialized cube that stores only those cells whose aggregate measure value satisfies a specified minimum threshold (the iceberg condition / minimum support).

  • Only cells meeting a condition such as count >= min_sup or sum(sales) > threshold are stored.
  • Cells below the threshold (typically the vast majority in sparse data) are discarded.
  • The name "iceberg" reflects that only the significant "tip" is materialized, while the large insignificant bulk stays hidden.
  • Benefit: Greatly reduced storage and computation while retaining the useful (frequent/significant) aggregates.

Comparison

FeatureFull CubeIceberg Cube
Cells/cuboids storedAll ($2^n$ cuboids, all cells)Only cells above threshold
Memory usageVery highSignificantly reduced
Query speedFastFast for significant cells
Best use caseLow dimensionalityLarge, sparse, high-dimensional data

Summary

For 5-dimensional data there are $2^5 = 32$ possible cuboids. A full cube precomputes all 32 cuboids (high storage cost), whereas an iceberg cube materializes only cells whose measure exceeds a minimum threshold, saving substantial space and computation.

Open this answer on its own page →

2078 · 5 marks

What are the choices for data cube materialization? Explain the strategies for cube computation. [5]

Show solved answer

Data Cube Materialization: Choices and Strategies for Cube Computation

Introduction

Data cube computation is an essential task in data warehouse implementation. The precomputation (materialization) of all or part of a data cube can greatly reduce response time and enhance OLAP performance. However, it is challenging because it may require huge computational time and storage space.


Choices for Data Cube Materialization

There are three main choices for data cube materialization:

1. Full Materialization

  • All cuboids in the data cube lattice are precomputed and stored.
  • Provides the fastest query response time since all aggregations are already computed.
  • Disadvantage: Requires enormous storage space and high computation cost, especially when the number of dimensions is large.

2. No Materialization

  • No cuboids are precomputed; all queries are computed on-the-fly from the base cuboid (raw data).
  • Disadvantage: Very slow query response time, especially for complex OLAP queries on large datasets.

3. Partial Materialization

  • Only a selected subset of cuboids is precomputed and stored.
  • Provides a balance between storage cost and query response time.
  • This is the most practical and widely used approach.

Strategies for Cube Computation

i) Full Cube Computation

  • Computes every possible cuboid for all combinations of dimensions.
  • For an n-dimensional data cube, the total number of cuboids is 2^n.
  • Suitable only when n is small and storage is not a constraint.

ii) Iceberg Cube

  • Instead of computing the complete cube, only those cuboids (cells) that satisfy a minimum support threshold (called the iceberg condition) are computed.
  • Cells with aggregate values below the threshold are discarded.
  • Example condition: HAVING count(*) >= min_support
  • This avoids computing and storing many low-value, sparse cells, saving both time and space.
  • The name comes from the idea that only the "tip of the iceberg" (the significant aggregates) is materialized.

iii) Shell Cube (Partial Materialization)

  • A strategy for partial materialization where only cuboids involving a small number of dimensions (such as 3 to 5) are precomputed.
  • These precomputed cuboids form a shell cube.
  • For example, in an n-dimensional data cube, we could compute all cuboids with 3 dimensions or less, resulting in a Shell Cube of size 3.
  • Remaining higher-dimensional cuboids are computed on-the-fly using the precomputed shell cuboids.
  • Advantage: Significantly reduces storage while still speeding up many common queries.

iv) Closed Cube

  • Only closed cells are materialized. A cell is closed if there is no supercell with the same measure value (e.g., same count).
  • Reduces redundancy in stored data by avoiding cells whose values can be directly derived from a more specific cell.

Summary Table

StrategyWhat is StoredStorage CostQuery Speed
Full MaterializationAll cuboidsVery HighVery Fast
No MaterializationNoneNoneVery Slow
Iceberg CubeCells above thresholdLowFast
Shell CubeCuboids with few dimensionsMediumModerate
Closed CubeNon-redundant closed cellsLowFast

Conclusion

Among all strategies, partial materialization (especially Iceberg Cube and Shell Cube) provides the best trade-off between storage cost and query performance, making them the most practical choices for real-world data warehouse implementations.

Open this answer on its own page →

Efficient method for data cube computation

2079 · 5 marks

Suppose that we have 5 dimensional data. What will be total number of cuboids generated? If we consider each dimension has 5 levels, what will be the number of cuboids generated? [5]

  • Number of dimensions: $n = 5$ - Number of levels per dimension (Part 2): $L = 5$ for each dimension --- For a data cube of $n$ dimensions where each dimension has no associated concept hierarchy, the total number of cuboids is: $$\text{Total Cuboids} = 2^n$$ Each cuboid corresponds to a subset ...
Open this answer on its own page →

2075 · 5 marks

Describe the significances of pre-computation of data cube. [5]

Data cube computation is an essential task in data warehouse implementation. Pre-computation refers to computing all or part of a data cube in advance (offline), so that query results can be retrieved quickly during online analytical processing (OLAP) rather than being computed on-the-fly. --- Pr...

Open this answer on its own page →