A levels Computer Science · Networks and databases
Big data
1What is big data?
Big data is data so large or complex that it cannot be stored and processed by traditional relational databases on one computer. It is often described by three Vs:
| V | Meaning | Example |
|---|---|---|
| volume | far too much data for one server | billions of social media posts |
| velocity | data arrives very fast and must be processed quickly, often in real time | sensor readings every millisecond |
| variety | many types and formats, much of it unstructured (no fixed fields) | text, images, video, GPS traces |
Unstructured data does not fit neatly into rows and columns, which is why relational databases struggle.
Check yourself
What does "velocity" mean in big data?
Show the answer
Data arrives very quickly and needs processing fast
Speed.
2Distributed processing
Big data is too large for one machine, so it is spread across many servers (a cluster) that work in parallel.
- Data is split into chunks, and each server processes its own chunk.
- Copies of each chunk are kept on different servers, so the system keeps working if one fails.
- Adding more servers increases capacity: this is scaling out.
Programs for distributed processing are hard to write with shared changing variables, because servers would interfere with each other. Functional programming helps: pure functions with immutable data can run on any server in any order and still give the right answer.
Check yourself
Why does functional programming suit distributed processing?
Show the answer
Pure functions with no side effects can run on many servers at once without interfering
No shared state.
3MapReduce
MapReduce is a way of processing big data across a cluster, built from the functional ideas of map and reduce (fold).
MapReduce counting words. Map makes (word, 1) pairs, shuffle groups them by word, and reduce adds up each group.
Counting words
- Split: the text is divided between servers.
- Map: each server turns its text into pairs (word, 1), for example ("data", 1), ("big", 1), ("data", 1).
- Shuffle: pairs with the same word are sent to the same server.
- Reduce: each server adds up the counts for its words: ("data", 2), ("big", 1).
- The final counts are combined into one result.
Check yourself
In MapReduce word counting, what does the map step produce?
Show the answer
Pairs of (word, 1) for every word
Key-value pairs.
4Fact-based models and graph schemas
In a fact-based model, each piece of data is stored as a separate, immutable fact with a timestamp: for example, "user 1042 moved to Leeds on 3 March". Facts are never changed or deleted; new facts are added instead.
Benefits: the full history is kept, mistakes can be corrected by adding newer facts, and data can be queried as it was at any time.
A graph schema shows how facts relate:
- nodes are entities, such as people or places;
- edges are relationships, such as "follows" or "lives in";
- properties store details, such as a name or a date.
Graph databases are very good at relationship questions, like "friends of friends" or "who bought what others bought".
Check yourself
Why are facts in a fact-based model immutable?
Show the answer
So the full history is kept and errors are fixed by adding new facts
Never overwrite.
5Uses of big data
| Area | Use |
|---|---|
| retail | recommendations ("customers who bought this also bought ...") |
| banking | spotting unusual card payments to detect fraud |
| health | finding patterns in patient data and tracking outbreaks |
| transport | live traffic data for route planning |
| science | analysing results from telescopes and particle colliders |
| machine learning | training models on huge data sets |
Big data analysis often uses machine learning, where programs find patterns in data rather than following hand-written rules.
Check yourself
How can a bank use big data to detect fraud?
Show the answer
By spotting card payments that do not fit a customer's normal pattern
Unusual patterns.
6Issues with big data
- Privacy: data may be collected without people fully understanding how it is used; combining data sets can identify individuals even when names are removed.
- Bias: if the data reflects past unfairness, decisions based on it (for example in hiring or lending) may repeat that unfairness.
- Security: huge stores of personal data are attractive targets for attackers.
- Accuracy: errors in data, or patterns found by chance, can lead to wrong conclusions. Correlation does not prove causation.
- Cost and energy: storing and processing big data needs large data centres that use a lot of electricity.
Laws such as data protection law control how personal data may be collected, used and kept.
Check yourself
Why can removing names from a data set fail to protect privacy?
Show the answer
Combining it with other data can still identify individuals
Re-identification.
Now test yourself
This lesson has a 8-question quiz and 5 exam-style questions with mark schemes in Impera. Free, with your progress saved.
Practise in Impera