Relational databases and NoSQL stores serve different access patterns. RDBMS for ACID transactions and relational integrity; NoSQL for scale-out, flexible schema, or specific query shapes (document, key-value, graph, columnar).
13.1 Relational vs NoSQL
The NoSQL family at a glance
Family
Examples
Best for
Document
MongoDB, CouchDB, DynamoDB
Flexible content; per-tenant
Key-value
Redis, DynamoDB, Memcached
Cache, sessions, counters
Wide column
Cassandra, ScyllaDB, HBase
Time-series at scale; IoT
Graph
Neo4j, ArangoDB, Neptune
Social, fraud, supply chain
Time series
InfluxDB, TimescaleDB, ClickHouse
Metrics, IoT, finance ticks
Relational
PostgreSQL, MySQL, Oracle, SQL Server
ACID, complex joins, OLTP
CAP theorem - choose two during a partition
Choice
Means
Examples
CP
Consistent + partition tolerant; may refuse writes
MongoDB (CP-tuned), HBase
AP
Available + partition tolerant; eventual consistency
Cassandra, Riak
CA
Consistent + available; only non-distributed
Single-node RDBMS
When to choose what
Need
Pick
Transactions across multiple rows
Relational
Flexible per-tenant content
Document
Fast in-memory cache / counters
Key-value
Time-series at high write volume
Wide column or Time series
Relationship-first queries
Graph
Worked example - the bakery's data choices
Workload
Store
Customers / orders / payments
PostgreSQL (transactional)
Product catalogue
PostgreSQL (small)
Session cache
Redis
Search
Elasticsearch / OpenSearch
Analytics events
ClickHouse
Reviews + ratings (UGC)
MongoDB
Common pitfalls
NoSQL because it is trendy; you really needed a JOIN.
Relational at scale you cannot afford; should have partitioned.
No schema discipline in document stores; soup over time.
Cache as primary data; lost on restart.
Cross-store consistency assumptions; eventual is not immediate.
Where this lives in EA
Database choice is Information + Technology Architecture. The data catalogue must record which entity lives where and which store is the system of record.
Mentor’s tip: Relational for ACID; NoSQL by access pattern. CAP forces a choice during partitions. System of record per entity is an EA decision; without it, every team picks their own truth.
Discussion
Loading…