Index

Free, with Google

Keep going, free.

A free account opens lessons 2 and 3 of every track, 33 more lessons, and keeps your progress and review cards on every device.

Start free with Google

A chalk plan

Open everything on chalk.

Every lesson, board, video, lab and paper, and the full review decks. Yearly is $39/year.

See plansStart free instead

Module 04 · System Design · The parts, properly · about 25 min to read

Watch: Choosing a datastore: the workload picks the book
▶ VideoPlay it as a journeyTutor comes with a plan

The Right Book for the Job (databases, deeply)

The Right Book for the Job
The Right Book for the Job · Open board

The track has been saying “the register”, “the ledger”, “the DB” as though there were one thing on the shelf. There is more than one kind of book, and the differences are not decoration. This is the story of how the shelf got that way, and how you pick off it.

Before you start. You need one idea from earlier in this track: a system keeps its facts somewhere and reads them back later, which is the ledger The copy clerks (database replication) copied and Splitting the ledger (sharding) cut into pieces. That is all. No SQL, no maths, no experience with any database.

Lesson 18 of 115 in System Design

The rest of this lesson is part of a plan.

A plan opens every lesson, board, video, lab and paper on chalk. Yearly is $39/year.

See plansAlready a member? Sign in

Or start free: a free account opens lessons 2 and 3 of every track.

In this lesson

  • 1968: Apollo’s parts list, and a book you had to walk
  • June 1970: Codd’s tables, and a question you are allowed to invent later
  • October 2007: Amazon’s cart, and four shapes that are not a ledger
  • Underneath every shape: the storage engine, and which way it is fast
  • Two doctors go off call at once: write skew, and the isolation level that catches it
  • Fourteen questions, six books: read the column nobody reads
  • The five models, with what each is actually for
  • The LSM engine, and the two amplifications
  • The isolation ladder, and what MVCC does not buy
  • ACID’s C and CAP’s C are different words
  • The bill, in machines

Terms it explains: access pattern, join, data model, Relational, ad-hoc query, schema, key-value, Document, Wide-column, Graph, storage engine, B-tree, LSM-tree, Write skew, isolation level, polyglot persistence, Write amplification, Read amplification, MVCC, snapshot isolation, SSI, two-phase locking, BASE, CAP, CAP's C is linearizability, in place, read-optimised, write-optimised, serializable, eight, zero.

Lab

Fourteen real queries, six datastores. Which one answers yours without a second system?

Pick A wall of numbered boxes, press Add next question fourteen times, and watch Where the fourteen went fill elsewhere.

Open The right book for the job

Ten vadas left and a crowd reaching at once. How does the stall sell exactly ten, and what does making sure cost?

Drag Buyers reaching for each vada to 12, switch between Hold the tray and Check the count again, and watch Time to an answer.

Open The last vada

Related papers

Review System Design