Common storage types

One user record. Two tables, one document, and a copy with a deadline on it.

SQL, document and cache holding one user record (interactive map)

The same read arriving at Postgres, MongoDB and Redis. Postgres walks the primary key and follows user_id into orders, so a user with none comes back as 0 rows. Mongo takes one seek to a document with the orders nested inside it, and the next document along has no orders field at all. Redis answers from a copy that its TTL takes away 60 seconds later.

← All cheatsheets