Choosing the right database

Sefism.

A to Z

Glossary

Every concept in this sheet, plus the smaller terms it uses. Select a concept to open its card.

A
Access patterns
The questions an app asks its data again and again, such as "get user by email" or "last 20 orders for a shop", with a rough idea of how often each runs.
ACID transactions
A transaction groups changes so they are atomic (all or nothing), consistent (rules hold), isolated (concurrent transactions do not interfere) and durable (saved once committed).
C
Consistency needs
How correct data must be at every moment.
Constraints
Rules the database enforces on every write: NOT NULL, UNIQUE, CHECK and foreign keys, which make a value refer to an existing row in another table.
D
Decision chart: data and access pattern to database
A quick map from the kind of data and the way it is used to the database type that usually fits.
J
JSON columns
Columns that store JSON inside a relational table.
M
Migrations, drivers and ORMs
A driver sends queries from your code; an ORM maps tables to objects.
MySQL, SQLite and SQL Server
MySQL is common behind websites and PHP apps.
O
One Postgres is often enough
One PostgreSQL database with jsonb, full-text search, pgvector, and TimescaleDB or PostGIS when needed covers relational data, flexible fields, search, similarity, time series and locations.
P
PostgreSQL as the default
PostgreSQL is an open source relational database that also stores and indexes JSON, has built-in full-text search and gains vectors, maps and time series through extensions.
Q
Questions to ask before choosing
A short list answered for every project: data shapes, top access patterns, size after a year, what must be exact, any search, similarity or reporting needs, where it runs, and who will look after it.
R
Read-write mix and data size
Whether an app mostly reads or mostly writes, how many records it will hold after a year and how big each one is.
Relational database
A database that stores data in tables of rows and columns, links tables with keys and is queried with SQL.
S
Structured, semi-structured and unstructured data
Structured data fits rows and columns with known types.
11 · Glossary, A to Z11 / 11