Relational vs Non-Relational (NoSQL) Databases
When starting a new project, the database question always comes up: relational or NoSQL? The answer is almost always relational.
Relational databases (Postgres, MySQL) enforce structure. Tables, rows, columns, constraints, transactions — everything has a place and a type. Data integrity comes built in.
Started out with MySQL and phpMyAdmin back in the day. Good old times.
NoSQL promises flexibility, but that flexibility usually means reinventing things SQL already handles. It adds up.
Postgres covers most needs. If document storage sounds appealing, jsonb is right there. NoSQL inside a relational database, without the mess.
Rule of thumb:
- Want your future self to thank you? Use a relational database.
- Want your future self to curse you? Go wild with NoSQL.
These days, Postgres with Drizzle ORM handles pretty much everything.