Relational database
A relational database stores data in tables made of rows and columns.
The core idea is that data has structure. Tables describe entities, columns describe attributes, and relationships between tables are usually expressed with primary keys and foreign keys.
Example
An application can store users and orders in separate tables:
| users | orders |
|---|---|
| id | id |
| user_id | |
| name | total |
The orders.user_id column points back to users.id.
What it is good for
Relational databases are strong when the application needs:
- structured data,
- constraints,
- transactions,
- joins,
- ad hoc queries,
- strong consistency.
Tradeoff
The schema gives safety and clarity, but it also means the data model must be designed and migrated carefully.
Theory that matters here
Relational databases lean heavily on ACID, Transactions, MVCC, Indexes, and the Query planner. They also make joins, constraints, normalization, and schema migrations central parts of the design.
Implementations
- Postgres — open-source relational database with strong SQL, transactions, indexing, replication, JSON support, and extensions.