Skip to content
Contents/CH 29
Distributed & Analytics/Advanced · 14 min

Fragmentation & Replication

Distribution has two basic moves: split the data or copy it. Fragmentation improves locality; replication improves availability.

In plain English

Split the books by city, or keep copies of the popular ones everywhere.

The one idea

Fragmentation partitions a relation; replication copies it. Both trade storage and coordination for locality and availability.

The physical distribution of rows determines which queries are local and which become expensive network joins.

By the end

  1. 01Distinguish horizontal and vertical fragmentation.
  2. 02Explain replication and its consistency cost.
  3. 03Know the trade-off between availability and consistency.
  4. 04Choose a distribution strategy for a workload.
01

Fragmentation

Horizontal fragmentation splits rows: customers in Europe go to one site, customers in Asia to another. Vertical fragmentation splits columns: frequently accessed columns stay together, large rarely used columns move elsewhere. A fragment must be reconstructible through union or join.

chapter-29.db
horizontal:
site A: customers where region = 'EU'
site B: customers where region = 'ASIA'

vertical:
site A: customer_id, name, email
site B: customer_id, profile_blob
02

Replication

Replication stores copies of the same data at multiple sites. It improves read availability and reduces latency, but every write must be propagated. Synchronous replication keeps copies consistent at the cost of latency; asynchronous replication is faster but can serve stale data.

03

Choosing a strategy

Use fragmentation when access is naturally partitioned by region or attribute. Use replication when reads dominate and availability matters. Most systems combine both: fragment large tables and replicate small, read-heavy reference data.

Worked example3 steps

Split by region, copy the catalog

Orders are written in three regions. Product categories are read everywhere and change rarely.

01

Horizontally fragment Orders by region.

Each site stores only its region's orders; local queries avoid the network.

02

Vertically fragment Customer into public and private columns.

Marketing reads the public fragment without access to sensitive fields.

03

Replicate the ProductCategory table to every site.

Reads are local, but an update must reach every replica.

ConclusionFragmentation is about where a row or column lives. Replication is about how many copies exist. They solve different problems and can be combined.

The trade-off

No free correctness.

Gain

Local reads, parallel processing, and availability.

Cost

Cross-site joins, replica consistency, and more complex failure handling.

Verdict

Fragment by access locality; replicate only data whose read/write ratio justifies the copies.

Recap

What to keep.

Takeaways

  • +Horizontal fragmentation splits rows; vertical splits columns.
  • +Fragments must be reconstructible.
  • +Replication trades write cost for read availability.
  • +Synchronous replication is consistent but slower.
  • +Asynchronous replication is faster but may be stale.

Traps

  • !Fragmenting without a way to reconstruct the original relation.
  • !Assuming replication is free.
  • !Ignoring write amplification under replication.

Focus

  • →Give one horizontal and one vertical fragmentation example.
  • →Compare synchronous and asynchronous replication.
  • →Match a strategy to a read-heavy workload.

Check yourself

Before you turn the page.

0 / 2 answered
01

What does horizontal fragmentation split?

02

What is the cost of synchronous replication?

DB//COSMOS

A field manual for database systems: model the domain, normalize the facts, query the relations, and protect the result.

Edition 2026 · 32 chaptersTopic catalogInterview prep