Relational vs Non-Relational (NoSQL) Databases
So, you’re building something and need to store data. The age-old debate pops up: relational or NoSQL? Here’s my take—just use a relational database. Seriously.
Relational databases (Postgres, MySQL) are like that friend who always brings order to chaos. Tables, rows, columns, relationships—everything in its place. You get constraints, transactions, and actual data integrity. What’s not to love?
I started out with MySQL, phpMyAdmin, ftp, good ol’ days.
NoSQL databases promise freedom. But with great freedom comes great confusion. You’ll spend half your time reinventing things that SQL already does for you.
If you want flexibility, Postgres has you covered. Need to store documents? Use jsonb
. It’s like having NoSQL inside your relational database, minus the headaches.
My rule of thumb:
- If you want your future self to thank you, use a relational database.
- If you want your future self to curse you, go wild with NoSQL (but don’t say I didn’t warn you).
For almost everything, I use Postgres these days (with Drizzle orm).
That’s it—just a note for future me (and maybe you).