Databases & SQL
Most database trouble is a schema or an index decision made months earlier. These articles cover querying well, what an index actually does to a lookup, how transactions protect you, and the honest trade-offs between relational and document stores.
Querying
- Cardinality Estimation Explained: Why the Query Optimizer Sometimes Guesses Wrong We built a real skewed table and caught a live database's own statistics estimating 49,622 rows for a value that actually matched 99,900, then measured the 4x performance cost of trusting that wrong guess. Tutorial · 10 min read · October 13, 2026
- Clustered vs Non-Clustered Indexes: What's Actually Different, Measured A real benchmark on 50,000 InnoDB rows: a clustered primary-key range scan took 4.96 seconds across 500 runs, a secondary index needing row lookups took 11.5 seconds for the identical result set. Comparison · 10 min read · October 10, 2026
- Covering Indexes Explained: Why a Query Can Be Fast Without Ever Touching the Table We benchmarked the same query 3,000 times each way on a real 50,000-row table: 74.6 seconds without a covering index versus 11.8 seconds with one, roughly 6.3x faster. Tutorial · 9 min read · October 6, 2026
- MVCC Explained: How Postgres and MySQL Let Readers and Writers Avoid Blocking Each Other We measured it directly: an update finished in 0.088 seconds while a reader held an open transaction on the same row, versus 3.5 seconds when a real lock was involved, demonstrating what MVCC actually buys you. Tutorial · 10 min read · October 4, 2026
- Database Transaction Isolation Levels Explained (With Real Dirty, Non-Repeatable, and Phantom Reads) We reproduced real dirty reads, non-repeatable reads, and phantom reads live on an actual database at different isolation levels, with the real output, instead of just describing the theory. Tutorial · 11 min read · October 1, 2026
- How Write-Ahead Logging Keeps Databases Crash-Safe If a database crashes halfway through updating a row, how does it come back up without corrupted data? It never updates the row first - it logs the intent, syncs that to disk, and only then touches the real data. We simulated a real crash to prove the recovery actually works. Tutorial · 9 min read · October 1, 2026
- Database Transactions: ACID, Isolation and Deadlocks Two UPDATE statements in a row are not a transaction. Catching the exception does not undo the first one, and that is how money disappears from a wallet table. Tutorial · 12 min read · August 6, 2026
- ORM vs Raw SQL: The N+1 Problem and When to Drop Down The loop that prints student.college.name runs one query per student. It is instant on your twenty-row dev database and it times out the moment real data arrives. Comparison · 12 min read · August 6, 2026
- SQL Injection Explained: The Fix Is Not Escaping Quotes Two dashes typed into a login box can delete the password check from your own query. The fix is not smarter escaping, and most beginners reach for escaping first. Tutorial · 12 min read · August 6, 2026
- SQL Commands Cheat Sheet for Interviews and Daily Work Every SQL command you need in one place, with the execution order that explains most of the errors beginners hit. Tips & Tricks · 10 min read · August 6, 2026
- SQL Interview Questions for Freshers (With Answers) SQL rounds are predictable. Joins, aggregation and one query about the second-highest salary account for most of what you will be asked. Career · 12 min read · August 6, 2026
- SQL Indexes Explained: When They Help and When They Hurt An index is the biggest single win available on a slow query — and the easiest thing to add so carelessly that it makes the database worse. Tutorial · 11 min read · August 5, 2026
- SQL Subqueries Explained: Queries Inside Queries Subqueries let you run a query inside another query. Learn how to use them in WHERE, FROM and SELECT — with clear examples, gotchas, and subquery vs JOIN. Tutorial · 8 min read · July 22, 2026
- SQL GROUP BY and HAVING Explained with Examples A beginner-friendly guide to SQL GROUP BY, aggregate functions, and how HAVING differs from WHERE, using a simple orders table and worked examples. Tutorial · 9 min read · July 22, 2026
- MongoDB Aggregation Pipeline Explained for Beginners A beginner-friendly guide to the MongoDB aggregation pipeline. Chain $match, $group, $sort, $project and $limit to find total orders per customer. Tutorial · 8 min read · July 22, 2026
- SQL Joins Explained: INNER, LEFT, RIGHT and FULL Learn how SQL JOINs combine rows from two tables. We cover INNER, LEFT, RIGHT and FULL OUTER JOIN with small examples, runnable queries and a cheat sheet. Tutorial · 9 min read · July 22, 2026
- SQL vs NoSQL: When to Use Which Database Relational or document? Compare schemas, scaling, transactions and query power, and learn the question that actually decides it for your project. Comparison · 10 min read · May 7, 2026
- SQL vs NoSQL: When to Use Which Database MySQL or MongoDB? PostgreSQL or Firebase? Understand the tradeoffs so you pick the right database for your project. Comparison · 10 min read · May 7, 2026
Design and performance
- MongoDB Schema Design: Embed or Reference? MongoDB will happily let one service store a pincode as a string and another store it as a number. Nothing errors. Your queries just quietly return half the results. Tutorial · 12 min read · August 6, 2026
- Redis Caching Basics: Cache-Aside, TTL and Invalidation A cached object comes back from Redis as JSON, so the Date you put in is now a string. The code that worked yesterday throws on line one, and only for cache hits. Tutorial · 12 min read · August 6, 2026
- MongoDB Indexes Explained: Faster Queries the Right Way Indexes are the single biggest win for MongoDB read speed. Here is how to create the right ones and prove they work with explain(). Tutorial · 9 min read · July 22, 2026
Beyond relational
- How Redis Actually Works Under the Hood: Data Structures, the Event Loop, and Persistence Redis looks like a fast key-value store from the outside. Inside, it's a single-threaded event loop juggling encodings that change under you, and two genuinely different ways of surviving a restart. Here's what's actually running. Tutorial · 11 min read · September 29, 2026
- Read-Through vs Write-Through vs Write-Behind Caching Explained Cache-aside isn't the only pattern in town. Here's what actually happens on disk and in memory with write-through and write-behind caching — timed, simulated, and shown with real output. Tutorial · 9 min read · September 24, 2026
- DBMS Interview Questions and Answers for Freshers DBMS theory rounds are predictable. Normalisation, ACID and keys account for most of what campus interviews ask. Career · 12 min read · August 6, 2026
- MongoDB CRUD Operations: A Beginner's Tutorial A hands-on beginner tutorial for MongoDB CRUD operations in the mongo shell — insert, find, update, and delete documents in a users collection. Tutorial · 9 min read · July 22, 2026
More on Databases & SQL
- Quorum Reads and Writes Explained: The Math Behind Dynamo-Style Consistency Simulated 20,000 write-then-read cycles across five W/R configurations and measured exactly how often a read misses the latest write when the quorum math doesn't add up. Tutorial · 9 min read · October 9, 2026
- Change Data Capture (CDC) Explained: How Systems Track Every Database Write How tools like Debezium turn every database write into a replayable event stream, demonstrated with a real SQLite trigger-based change log that reconstructs table state from scratch. Tutorial · 9 min read · October 8, 2026
- How Geospatial Indexes Actually Work (R-Trees, GeoHashes, and 'Nearby Restaurants') A real geohash encoder, run on actual coordinates for Mumbai, Delhi, and Bengaluru, showing exactly why nearby points share a prefix — and the boundary case that breaks it. Tutorial · 9 min read · October 5, 2026
- How Columnar Storage Actually Works (Why Analytics Databases Don't Use Rows) We wrote the same 2 million rows as CSV and as Parquet and measured the real file sizes and real query time difference. The columnar file was 2.7x smaller — here's exactly why. Tutorial · 8 min read · October 3, 2026
- How B-Trees and LSM-Trees Actually Store Your Data (Postgres vs Cassandra) We built a real B-tree and watched it split its root twice, and built a real LSM-tree and watched a tombstone survive a compaction step by step — not diagrams, actual Python that actually ran. Tutorial · 11 min read · September 26, 2026
- CSS z-index: Why 9999 Sometimes Does Nothing Your dropdown has z-index 9999 and still sits behind the next card. The number is not the problem. An ancestor with a transform quietly locked it into its own layer. Tutorial · 10 min read · August 6, 2026
- Backend Developer Roadmap: A Practical Order to Learn In Backend is less about frameworks than about data, correctness and failure. This is the order that builds those, rather than a list of logos. Career · 12 min read · August 6, 2026
- CSS Media Queries: Make Your Site Responsive A beginner-friendly guide to CSS media queries: mobile-first thinking, breakpoints, min-width vs max-width, and a before/after responsive card demo. Tutorial · 9 min read · July 22, 2026
