DBMS · Module 9 — Beyond Relational
The Four NoSQL Families
Key-value stores one blob per key, document stores nested records, column-family handles huge sparse write-heavy data, and graph makes connections first-class.
"NoSQL" is not one thing. Redis and Neo4j are both NoSQL, and they have almost nothing in common.
Four families, four shapes of data.
Why & what
Each family exists because a particular data shape was awkward in tables. Knowing which is which means you can name the right tool instead of saying "some NoSQL thing."
The four families are key-value, document, column-family and graph — each built for a different shape of data.
How it works
- Key-value. One key, one blob of data. That's all. session:abc123 → the logged-in user's session. Blindingly fast, no querying inside the value. Redis. Good for caches, sessions, counters.
- Document. A record is a JSON document, and it can nest. Aisha plus all her enrollments inside one document. You can query inside it, unlike key-value. MongoDB. Good for catalogues, user profiles, content.
- Column-family. Rows that can have thousands of sparse columns, stored by column rather than by row. Built for enormous write volume. Cassandra. Good for time series, event logs, sensor data.
- Graph. Nodes and the edges between them are both first-class. "Find friends of friends who took DBMS 101" is a short query here and a nightmare of self-joins in SQL. Neo4j. Good for social networks, fraud detection, routing.
- Match family to shape. Flat lookups → key-value. Nested records → document. Massive write streams → column-family. Heavily connected data → graph.

Notice: pick the family by the shape of your data, not by popularity.
Common confusion
People use "NoSQL" and "MongoDB" interchangeably. MongoDB is one product in one family. Naming the four families and one example of each is a small thing that separates a real answer from a vague one.
Second: graph databases aren't for "graphs" in the chart sense. They're for networks of connections — people, accounts, roads. The name confuses a surprising number of candidates.
Interview angle
- "Name the types of NoSQL databases with an example of each." — Key-value (Redis), document (MongoDB), column-family (Cassandra), graph (Neo4j). Add one use case each.
- "When is a graph database clearly the right choice?" — When queries follow relationships several hops deep, like friends-of-friends, where SQL would need repeated self-joins.
- "What is a key-value store good for?" — Fast lookups by a single key — sessions, caches, counters — where you never need to query inside the stored value.
Recap
Key-value stores one blob per key, document stores nested records, column-family handles huge sparse write-heavy data, and graph makes connections first-class.