01Overview

In the mid-2000s Google’s BigTable (2006) and Amazon’s Dynamo (2007) showed another path: key-value stores, column families, eventual consistency and horizontal scale. In 2009 MongoDB and Redis brought documents and in-memory structures into the mainstream, and “NoSQL” became a slogan.

NoSQL is not one technology but a set of trades: give up a rigid schema and cross-row transactions for elasticity and throughput. Engineering soon found that most applications still wanted transactions and queries, and NewSQL and a relational revival followed. Today “NoSQL” names a family of data models rather than a rejection of SQL.

02History

  1. 2006

    BigTable

    Column families and distributed indexes.

  2. 2007

    Dynamo

    Eventual consistency and consistent hashing.

  3. 2009

    MongoDB and Redis

    Document and in-memory stores go mainstream.

  4. 2012

    NewSQL

    Fusion routes such as VoltDB and Spanner.

03Core concepts

Key-value store

The simplest model: one key, one value.

Document database

Stores semi-structured data as JSON/BSON documents.

Eventual consistency

Replicas diverge for a while, then converge once writes stop.

04Hands-on

Do it once — it beats reading it ten times

Model one feature (a comment thread) in a relational schema and in a document store, then list what each makes hard

05Self-check

Say it in your own words first, then open the answer. Whatever you cannot explain is what to review next.

Can you explain "Key-value store"?

The simplest model: one key, one value.

Can you explain "Document database"?

Stores semi-structured data as JSON/BSON documents.

Can you explain "Eventual consistency"?

Replicas diverge for a while, then converge once writes stop.

What problem did it solve, and why was there nothing better at the time?

Go back to the history section: how was this done before, and what did it cost?

If you had to build it today, how would you break it down?

Use the hands-on task above: write a plan of at most three steps before you start.

06Key people

J

Jeff Dean

1968 –

A driving force behind BigTable, MapReduce and Spanner.

S

Sanjay Ghemawat

1968 –

BigTable and the Google File System.

07Further reading

  • NoSQL DistilledSadalage & Fowler · 2012
  • Database System ConceptsSilberschatz et al. · 1997