Data without rigid tables. NoSQL stores flexible documents, key/value pairs, graphs and more — trading SQL's strict schema for speed, scale and shape-shifting freedom.
In a document database, each record is a free-form JSON-like document. No CREATE TABLE, no fixed columns — two documents in the same collection can have different fields. Add some below; notice how each can have a different shape.
// Real MongoDB shell — same idea, on a real server db.users.insertOne({ name: "Ada", role: "engineer", age: 36 }) db.users.insertOne({ name: "Grace", city: "NYC" }) // different shape, no problem db.users.find({ role: "engineer" })
Relational databases force every row into the same columns. Document stores let your data evolve: add a field to one record without migrating the rest. Great for fast-moving products and deeply nested data (an order with its line-items embedded inside it).
{
"_id": "a1f9",
"name": "Ada",
"orders": [ // nested array — no JOIN needed
{ "product": "Monitor", "amount": 229 },
{ "product": "Keyboard", "amount": 49.99 }
]
}
Redis keeps data in RAM, so a GET returns in microseconds — perfect for caches, sessions and leaderboards. Set a few keys, then fetch one and watch how a memory read compares to going to disk.
# Real Redis CLI — runs on a real server SET session:42 "user=ada" GET session:42 # → "user=ada", in ~0.2 ms from RAM EXPIRE session:42 3600 # auto-delete after an hour
There's no single winner — pick the model that fits your data. NoSQL trades guarantees for flexibility and horizontal scale.
"NoSQL" is an umbrella over several very different models.