What Happens When You Type a URL and Press Enter
DNS lookups, TCP and TLS handshakes, HTTP requests, servers, and the browser's rendering pipeline. The whole journey of a web page, explained so it finally clicks.
Read →The choice isn't about which database is modern or fast. It's about the shape of your data and how you'll query it. A practical comparison and a simple decision process.
"Should I use MongoDB or Postgres?" is one of the most common questions in web development, and the internet is full of strong opinions. The real answer depends on your data, your queries and your team, not on which one is trendier. Let's make the choice practical.
SQL (relational) databases, like PostgreSQL, MySQL, SQLite and SQL Server, store data in tables with defined columns. Tables relate to each other through keys, and you combine them with joins. The database enforces structure and relationships.
NoSQL databases is a broad umbrella:
Most "SQL vs NoSQL" debates are really "relational vs document," so that's the focus here.
Modern relational databases also handle semi-structured data well. PostgreSQL's jsonb columns let you store and index flexible JSON alongside regular columns.
The trade-off: data that's duplicated across documents has to be kept in sync by your code, and queries that cut across relationships get awkward.
For most web applications, start with PostgreSQL (or MySQL, if your stack leans that way). It handles relational data, JSON, full-text search and even vector embeddings through extensions. When a specific need appears, such as caching, a high-volume event stream or a graph problem, add a specialised store for that job.
Choose a document database first when your data really is document-shaped and rarely related, or when your platform (Firebase, for example) makes it the natural choice.
Need somewhere free to host either? See free database hosting for side projects.
Neither is universally better. PostgreSQL suits relational data, transactions and flexible querying. MongoDB suits document-shaped data with variable structure that's usually read as whole objects.
SQL. It's used almost everywhere, it teaches data modelling fundamentals, and the skills transfer between databases and decades.
Yes. PostgreSQL's jsonb and MySQL's JSON column types store, query and index JSON data, giving you flexibility without giving up relational features.
DNS lookups, TCP and TLS handshakes, HTTP requests, servers, and the browser's rendering pipeline. The whole journey of a web page, explained so it finally clicks.
Read →There are dozens of HTTP status codes, but about fifteen cover nearly everything. What each one means, when to return it, and the mix-ups (401 vs 403, 301 vs 302) that confuse everyone.
Read →A, AAAA, CNAME, MX, TXT and NS records in plain English, why DNS changes seem slow, and the troubleshooting commands that tell you what is really going on.
Read →