The big idea: A distributed database spreads data across several machines, often in different places, while appearing to users as one database.
The reason is usually simple: the data no longer fits on one machine, or the service cannot afford that machine failing.
| Replication | Fragmentation (sharding) | |
|---|---|---|
| Does | Keeps copies of the same data | Splits the data between machines |
| Helps with | Availability and read speed | Capacity and write throughput |
| A machine fails | Another copy serves it | That portion is unavailable |
| Cost | Copies must be kept in step | A query spanning shards is expensive |
Most real systems do both: Shard to fit the data, then replicate each shard so no single failure loses a portion. The two solve different problems and are not alternatives.
Free preview
This is the free notes preview
You're reading the free notes. Aimnova Pro unlocks the full study experience — and you can try it with your first topic free to keep:
- FlashcardsLock in vocabulary and key terms with spaced repetition.
- Practice questionsAnswer exam-style questions and get instant AI marking.
- Mock exams & past-paper vaultSit full mocks and see exactly how examiners award marks.
- Personalised study planA daily plan built around your exam date and weak areas.
Availability
- One machine failing does not stop the service
- Maintenance without downtime
- A whole data centre can be lost and the system survive
Scale
- Add machines rather than buying a bigger one
- Storage and write capacity grow together
- There is a limit to how large one machine can be
Locality
- Keep data near the users who read it
- A request crossing the world costs real latency
- Some laws require data to stay in a country
Memorize terms 3x faster
Smart flashcards show you cards right before you forget them. Perfect for definitions and key concepts.
Consistency against availability: When machines cannot reach each other, the system must choose:
Stay consistent — refuse to answer rather than risk returning stale data. Stay available — answer from whatever copy is reachable, accepting that it may be out of date.
You cannot have both during a network partition, and which one you choose is a business decision.
The other costs
- Complexity — far harder to design, operate and reason about
- A query spanning shards may need a join across the network, which is slow
- Eventual consistency means a read straight after a write can return the old value
- Debugging is harder: the fault may be in the network, not in any machine
- Transactions across machines are difficult and often not offered at all
Pick the right side for the scenario: A banking balance must be consistent — better to refuse than to allow two withdrawals of the same money.
A social media feed should stay available — a post arriving a few seconds late is nobody's disaster.
An answer naming which matters here is the one that scores.
How this is tested — you must distinguish replication from fragmentation, and choose a side of the consistency trade-off from the scenario. It comes up two ways:
Paper 1 Section A
- Describe the features of distributed databases, 3-4 marks
- Define replication or fragmentation
- State one advantage of distribution
Paper 1 Section B — case study
- Justify distribution for a scenario
- Explain the consistency–availability trade-off
The classic trap: Listing advantages without the cost. Distribution forces a choice between consistency and availability during a partition, and the answer must say which this scenario needs and why.
A global messaging service stores billions of messages and must stay usable when a data centre fails. Describe how a distributed database would be used, and the trade-off it forces.
Model answer plan
See the mark-by-mark plan — for / against / judgement, with marking guidance — in study mode.