Machine Room

SQL vs NoSQL

A common interview question: which one, and why? The one-page notes from the reel.

Download the PDF

One-page notes on SQL vs NoSQL: Alice, city Paris, two orders, as a users row plus an orders table in SQL and as one document in NoSQL; a five-row table of differences: data model (one model of tables linked by ids vs a family: key-value, document, column, graph), schema (columns declared first, a new field is a migration vs each record has its own shape), scaling (a bigger server, sharding is the hard part vs built to be spread across servers from day one), transactions (all or nothing, SQL is built for this vs guaranteed only inside one record), reading (any question across the tables with a join vs fastest reading one record whole); the answer is your use case: bank payments, linked data, a fixed structure for SQL; a product catalog, a changing shape, data across many servers for NoSQL. Say which one, and say why.

On a phone, press and hold the image to save it. The reel: SQL vs NoSQL: The Interview Answer in Five Differences.