Course contentsShow
← System Design
Lesson 444 of 1,91912. NoSQL: Wide-Column StoresFree lesson

Data Model: Sparse, Distributed, Multi-Dimensional Map

How BigTable organizes data as a sparse map indexed by row key, column key, and timestamp for versioning.

Data Model: Sparse, Distributed, Multi-Dimensional Map

What you'll learn: How BigTable organizes data as a sparse, three-dimensional map indexed by row key, column key, and timestamp.

The Three-Dimensional Map

BigTable's data model is fundamentally a map (like a dictionary or hash table), but with three coordinates instead of one:

(row_key, column_key, timestamp) → cell_value

Every piece of data lives at the intersection of these three dimensions. Think of it like a massive spreadsheet where:

  • Row keys identify entities (like user IDs)
  • Column keys identify attributes (like "name" or "email")
  • Timestamps track versions of the same cell

Why "Sparse"?

The map is sparse because most cells are empty, and BigTable only stores cells that actually contain data. If a row has 5 columns populated but could theoretically have millions of columns, BigTable doesn't waste space on the empty ones.

Imagine a contact book where some people have addresses, some don't, some have multiple phone numbers, others have none—you only write down what exists.

Multi-Dimensional Versioning

The timestamp dimension enables versioning. You can store multiple versions of the same cell and retrieve historical values. BigTable can automatically keep the N most recent versions or versions within a time window.

For example:

  • (user123, profile:name, t1) → "Alice"
  • (user123, profile:name, t2) → "Alice Smith"

Both versions coexist, queryable by timestamp.

Distributed Nature

BigTable distributes this map across many servers by splitting rows into tablets (as you learned previously). Each tablet handles a contiguous range of row keys, making the entire structure scalable.

Key Takeaway: BigTable's data model is a sparse, three-dimensional map indexed by (row, column, timestamp), storing only populated cells and enabling automatic versioning across a distributed system.