A3.4.3 · Alternative databases and data warehouses
OLAP and data mining
By the end you can
Explain how OLAP cubes and data mining turn warehouse data into business decisions.
A warehouse is only useful if people can get answers out of it. Two families of tools do that: OLAP, for exploring summarised data, and data mining, for discovering patterns.
OLAP: looking at a cube#
stores warehouse data in a multi-dimensional structure called a . Each dimension is one way of looking at the data: product, place, time. Each cell holds a measure, such as total sales. Because the sums are prepared in advance, analysts can look at the data from any side and change the level of detail almost instantly. The operations to know:
- Roll-up: summarise to a higher level (quarters become years, cities become countries).
- Drill-down: the reverse: go into more detail (a year becomes its four quarters).
- Slice: hold one dimension at a single value, such as all the sales in 2025, giving one layer of the cube.
- Dice: choose particular values on several dimensions: for example just two products in two countries.
- Pivot: rotate the cube, swapping rows and columns for a new view of the same numbers.
These support decisions such as budgeting (where is money being wasted?) and forecasting (what will sell next quarter, judging by past trends?).
| Year \ Category | Audio | Computers | Total |
|---|---|---|---|
| 2024 | 35,000 | 146,230 | 181,230 |
| 2025 | 40,280 | 168,150 | 208,430 |
| Total | 75,280 | 314,380 | 389,660 |
Rolling up and drilling down only change the level of detail: the grand total stays 389,660. Sales figures are invented data.
Data mining: finding what you did not know to look for#
OLAP needs a person to ask the questions. goes through the raw data with algorithms to find patterns nobody asked about. The common techniques:
- Classification: put items in known categories (spam or not; likely to buy or not) using a model trained on examples that already have labels.
- Clustering: group items that are alike, with no labels given. It reveals customer segments, and where a new product sits among existing ones.
- Regression: predict a number from other numbers, such as next quarter's profit from past sales and costs.
- Association rule discovery: find things that go together, such as sausages and barbecue sauce, to place products and plan offers.
- Sequential pattern discovery: find common orders of events, such as the pages most people click one after another, to predict what a customer will do next.
- Anomaly detection: spot outliers that do not fit the pattern: a card used in two countries at once, an unusual jump in network requests, a drug batch outside its limits.
Companies use these to target marketing, set prices, detect fraud and forecast demand. They need good data to work from (hence the cleaning in ETL), and their conclusions should be questioned: a pattern in the data is not proof of a cause.
Predicting a house’s price from its size, location and age, using past sales.
Finding that shoppers who buy nappies on Fridays often add crisps.
Labelling each new email as spam or not spam from thousands of labelled examples.
Letting the computer split customers into groups that behave alike, with no groups defined in advance.
Noticing that most users who visit page A then B then C go on to buy.
A sudden surge of login attempts from one country at 3am.
0 of 6 matched
Check yourself
OLAP and data mining
Quick questions, made fresh every time and marked here. Do a few until they feel easy.
Exam practice
Paper 1-style questions
5 questions · 17 marks
Write your answer as you would in the exam, then show the mark points and tick each one your answer made. These are our own questions in the style of the exam, not past-paper questions.
1.Describe how online analytical processing (OLAP) helps a business make decisions.
[4]Describe: A detailed account: say what happens, step by step if it is a process.
2.Distinguish between the OLAP operations roll-up, drill-down, slice and dice.
[4]Distinguish: Make the differences between two things clear.
3.Distinguish between OLAP and data mining.
[3]Distinguish: Make the differences between two things clear.
4.Identify the data mining technique used in each case: (a) predicting next quarter’s profit from past sales, (b) finding that customers who buy sausages often buy barbecue sauce, (c) flagging a card payment far from a customer’s usual spending.
[3]Identify: Pick out the answer from the options or the context.
5.Describe the difference between classification and clustering.
[3]Describe: A detailed account: say what happens, step by step if it is a process.
Past papers
Old exam questions on this topic
From HL Paper 1, May 2014 to November 2025. These papers were set on the previous syllabus, so the wording may differ from today's exam, but the topic is the same. Find the questions and markschemes in your school's past-paper pack.
| Paper | Question | Marks | About |
|---|---|---|---|
| May 2024 | 4(e) | 4 | Paper 2 Option A: OLAP and data mining |
| May 2024 | 4(f) | 6 | Paper 2 Option A: OLAP and data mining |
| November 2024 | 3(c)(i) | 4 | Paper 2 Option A: OLAP and data mining |
| November 2023 | 4(e) | 4 | Paper 2 Option A: OLAP and data mining |
| November 2020 | 4(d) | 5 | Paper 2 Option A: OLAP and data mining |
| May 2019 | 4(c) | 6 | Paper 2 Option A: OLAP and data mining |
| November 2019 | 4(g) | 6 | Paper 2 Option A: OLAP and data mining |
| May 2018 | 4(e) | 4 | Paper 2 Option A: OLAP and data mining |
In a nutshell
- OLAP stores warehouse data in a cube with dimensions (such as product, place, time) so it can be summarised and explored quickly from many angles.
- Operations: roll-up (less detail), drill-down (more detail), slice (fix one dimension), dice (choose values on several), pivot (swap axes).
- Data mining uses algorithms on raw data to find hidden patterns: classification, clustering, regression, association rules, sequential patterns and anomaly detection.
- Business uses: budgeting, forecasting, targeted marketing, pricing, fraud detection.
- OLAP answers questions you can already ask; data mining finds questions you had not thought of.
