What is an OLAP cube and its operations?
multidimensional analysis concepts.
a cube pre-aggregates measures across dimensions; operations are slice, dice, drill-down, roll-up, and pivot.
WHAT THIS TESTS This evaluates your grasp of multidimensional analysis and your judgment on when precomputation pays off versus when it wastes effort.
A GOOD ANSWER COVERS An OLAP cube is a multidimensional structure that organizes a measure, such as sales, across several dimensions, such as time, product, and region, with aggregates precomputed at various intersections so reports return quickly. The standard operations are slice, which fixes one dimension to a single value to get a sub-cube, for example sales for one month; dice, which selects ranges across two or more dimensions to get a smaller cube; drill-down, which moves to finer granularity, like quarter to month to day; roll-up, which aggregates to coarser granularity, like city to region to country; and pivot, which rotates the cube to view dimensions along different axes. The decision to pre-aggregate depends on access patterns. Pre-aggregating into a cube or materialized aggregate suits repeated, predictable queries that demand low latency over stable dimensions, since you pay computation once and serve fast reads. Querying raw data directly suits ad hoc exploration, very high-cardinality dimensions where precomputing all combinations explodes in size, and cases needing the freshest data, since cubes lag until rebuilt.
COMMON WRONG ANSWERS Mixing up slice, which fixes a single dimension value, with dice, which selects multiple ranges. Reversing drill-down and roll-up. Saying pre-aggregation is always better, ignoring storage blow-up from too many dimension combinations and the staleness between rebuilds. Forgetting that modern columnar engines often query raw data fast enough to reduce the need for full cubes.
LIKELY FOLLOW-UPS How does cube cardinality explode with dimensions, and what is sparsity? When do materialized views replace cubes? How do you keep a cube fresh? What is ROLAP versus MOLAP versus HOLAP?
ONE CONCRETE EXAMPLE A finance dashboard shows revenue by region and quarter for executives every morning. Pre-aggregating those into a cube makes the dashboard instant. When an analyst then explores an unexpected dip down to individual transactions on rarely combined filters, querying the raw warehouse directly is the right tool, since no cube anticipates that ad hoc cut.
Read the original → en.wikipedia.org
Get five bites like this every day.
Tezvyn delivers a daily feed of 60-second tech bites with quizzes to lock in what you learn.