MEPX
Chapter 1 of 10All chapters

Chapter 1 of 10

Why a database

What it gives you that files do not.

The guarantees

A database enforces structure, prevents contradictory writes from concurrent users, survives a crash mid-write and answers questions you did not plan for. Files give you none of that.

  • Concurrency is the hard part, and the reason people stop using files.
  • Querying arbitrary questions later is the second reason.

Families

Relational databases store rows in tables with enforced relationships. Document, key value, graph and time series databases each trade some of that for a different strength.