MEPX
Chapter 8 of 10All chapters

Chapter 8 of 10

When not to use tables

Document, key value and graph stores.

The trade

A document store keeps a whole record together, which suits varying shapes read as a unit. It gives up joins and enforced relationships, so that checking moves into your code.

  • Key value stores are for caches and sessions: fast, simple, no querying.
  • Graph databases suit data where the connections are the question, such as networks.

Choosing honestly

Most applications are relational in shape, and a relational database with JSON columns covers the flexible parts. Pick by access pattern rather than by fashion.