Explain like I'm five · Database

What is OLAP?

OLAP, told as a story about a manager slicing the whole warehouse's inventory by region, time, and item — instead of handling one box at a time.

I want to know how inventory changed by region this quarterbut every receipt has to be added up by hand

Finding this quarter's regional inventory changes means adding every receipt by hand.A pile of receipts alone doesn't show the regional stock trend.

just 1 box, right now✓ one record: fastbut a whole year's total?✕ the total: slowhandling one record (OLTP) and analyzing all records are different jobs

A receipt-handling system is fast on one record but slow at the full aggregate.Handling one record (OLTP) and analyzing all records are different jobs.

regiontimeitemOLAP = pre-stacked data, sliced by region, time, and item, any way you likeslice the cube any way, and the analysis answer is right there

OLAP pre-stacks data by region, time, and item, and slices it any way you like.Slice the cube any way, and the analysis answer is right there.

Pre-stack into a cubetotals computed up front by region, time, and item
Slice and dicecut straight through one axis
Drill downquarter → month → day
Pivotswitch the view axis, say from region to time
OLTPOLAPone receipt in or outshort, fast transactionsaccurate about 'this one box, right now'big aggregates across region × time × itemstrong on complex analytical questionsthe latest transactions can show up a bit latethe worker uses OLTP; the manager uses OLAP

The worker uses OLTP; the manager uses OLAP.OLTP handles 'this box right now'; OLAP handles the overall trend.

the cube is usually rebuilt in periodic batchesso the latest transactions reach the cube a bit lateRPmulti-dimensional indexes cut cube lookup timeOLAP isn't built for checking the one record that just came in

OLAP isn't built for checking the one record that just came in.The cube is usually rebuilt in periodic batches, and multi-dimensional indexes cut its lookup time.

In one breath

OLAP (Online Analytical Processing) analyzes the whole dataset by pre-aggregating it across several axes — region, time, item — and slicing it any way you like.

Unlike OLTP, which processes one transaction quickly, OLAP uses a cube (multi-dimensional aggregate) structure to support fast slice/dice, drill-down, roll-up, and pivot operations. It's typically built by modeling data warehouse data into a star schema, and reflecting the very latest transactions lags by however often the cube batch-refreshes. MOLAP usually precomputes the cube, while ROLAP usually computes aggregates from relational tables at query time.

When grown-ups say it

OLTP
Processing one receipt quickly. The counterpart concept to OLAP.
Cube
A block pre-stacked across several axes. The core structure behind OLAP analysis.
Slice & Dice
Cutting one slice, or several, out of the cube. The basic way of viewing a cube.
Drill-down
Digging from a big unit into a smaller one. Quarter → month → day, for example.
Pivot / Roll-up
Rotating the view axis (pivot), or adding values up to a bigger unit (roll-up). Views the same data from a different angle.
Star Schema
The table design used to build a cube. Splits into fact tables and dimension tables.
Multi-dimensional Index
The index that speeds up cube lookups. A related page in the same field. → finding by several tags at once
Batch Refresh Lag
The delay caused by how often the cube is rebuilt. The latest transactions reach the cube at the next rebuild.
Next story
The Warehouse Rebuilt by Software →
Want another term as a picture book? Request →