# NoSQL Families and When to Use Them

> Understand document, key-value, wide-column, graph and time-series stores and the trade-offs they make versus SQL. Free notes, key concepts, resources and a...

Canonical: https://www.internhack.in/roadmaps/tracks/backend/nosql-fundamentals
Last updated: 2026-11-28

Understand document, key-value, wide-column, graph and time-series stores and the trade-offs they make versus SQL.

Intermediate · about 3 hours · difficulty 2/5

Learn first: [The Relational Model](https://www.internhack.in/roadmaps/tracks/backend/relational-model), [Schema Design and Normalization](https://www.internhack.in/roadmaps/tracks/backend/schema-design-normalization)

"NoSQL" is not one technology but a family of databases that relax parts of the relational model to win at specific workloads. Knowing the families helps you pick deliberately instead of following hype.

### The main families

- **Document stores** (MongoDB, Couchbase, Firestore): JSON-like documents with flexible fields. Good for aggregates you read and write as a whole, like a product with its variants.
- **Key-value stores** (Redis, DynamoDB, etcd): look up a value by key, extremely fast and simple. Good for sessions, caches, counters and well-known access patterns.
- **Wide-column stores** (Cassandra, ScyllaDB, HBase): rows partitioned across many nodes, tuned for huge write volumes.
- **Graph databases** (Neo4j, Amazon Neptune): nodes and relationships as first-class data, good for traversals like "friends of friends".
- **Time-series databases** (InfluxDB, TimescaleDB, Prometheus): append-heavy timestamped measurements with rollups and retention.

### The trade-offs

Most NoSQL systems give up some combination of joins, flexible ad hoc queries, multi-record transactions or strong consistency in exchange for horizontal scale, schema flexibility or raw speed. **Schema-less rarely means no schema**; it means the schema lives in your application code, so you still need validation and migrations.

### Design from access patterns

With SQL you normalize first and write queries later. With most NoSQL stores you list the queries first and shape the data to answer them, often duplicating data on purpose.

### A sane default

Start with a relational database like PostgreSQL (which also has solid JSON support) and add a specialized store when a concrete workload demands it. Many production systems use several: Postgres as the source of truth, Redis for caching, a search engine for text search.

You are ready to move on when you can take three example workloads and justify which family fits each and what you give up.

## Key concepts

- **Document stores**
- **Key-value stores**
- **Wide-column stores**
- **Graph databases**
- **Time-series databases**
- **Access-pattern-first modeling**
- **Polyglot persistence**

## Mini project

Write a one-page decision record for a fictional app (chat, analytics dashboard, product catalog) choosing a data store for each feature and listing the trade-offs.

## Check yourself

What does a document database give up compared to PostgreSQL, and what does it gain in return?

## Free resources

- [NoSQL Guide](https://martinfowler.com/nosql.html) (Martin Fowler)
- [What is NoSQL?](https://aws.amazon.com/nosql/) (AWS)
- [Designing Data-Intensive Applications](https://dataintensive.net/) (Martin Kleppmann)

Previous: [Payments, Webhooks and Idempotency](https://www.internhack.in/roadmaps/tracks/backend/payments-webhooks) · Next: [Document Databases with MongoDB](https://www.internhack.in/roadmaps/tracks/backend/mongodb)

## More in Beyond Relational: NoSQL and Search

- [NoSQL Families and When to Use Them](https://www.internhack.in/roadmaps/tracks/backend/nosql-fundamentals)
- [Document Databases with MongoDB](https://www.internhack.in/roadmaps/tracks/backend/mongodb)
- [Key-Value Stores and DynamoDB](https://www.internhack.in/roadmaps/tracks/backend/key-value-dynamodb)
- [Wide-Column Stores: Cassandra and ScyllaDB](https://www.internhack.in/roadmaps/tracks/backend/cassandra-wide-column)
- [Graph Databases with Neo4j](https://www.internhack.in/roadmaps/tracks/backend/graph-databases)
- [Time-Series Databases](https://www.internhack.in/roadmaps/tracks/backend/time-series-databases)
- [Full-Text Search Fundamentals](https://www.internhack.in/roadmaps/tracks/backend/full-text-search-basics)
- [Search Engines: Elasticsearch and OpenSearch](https://www.internhack.in/roadmaps/tracks/backend/elasticsearch-opensearch)

## Related

- [Roadmaps](https://www.internhack.in/roadmaps)
- [Backend Developer Roadmap](https://www.internhack.in/roadmaps/tracks/backend)
