NoSQL Consistency Trap
Teams choose NoSQL databases (MongoDB, DynamoDB, Cassandra) for horizontal scalability and schema flexibility. The early experience is great — fast writes, easy schema changes, no migrations. Then the application grows. Relationships between data emerge. Queries that were simple become multi-collection joins done in application code. Data inconsistencies appear because there are no foreign keys or transactions. The team spends more time working around the database's limitations than they saved by avoiding SQL.
What people believe
“NoSQL databases scale better than relational databases and simplify development.”
| Metric | Before | After | Delta |
|---|---|---|---|
| Data quality incidents | Rare (SQL constraints) | Monthly (no constraints) | +500% |
| Query complexity in application code | SQL handles joins | Application handles joins | +200% code |
| Time to add new features involving relationships | Hours (SQL) | Days (NoSQL workarounds) | +300% |
| Horizontal write scalability | Limited (SQL) | Near-linear | Significant improvement |
Don't If
- •Your data has relationships — which is almost always
- •You need transactions for financial, inventory, or user account operations
- •Your team doesn't have deep distributed systems experience
If You Must
- 1.Use NoSQL only for genuinely document-shaped data with no cross-document relationships
- 2.Implement schema validation at the database level, not just application level
- 3.Plan for eventual consistency — design UIs that handle stale reads gracefully
- 4.Keep a relational database for transactional data alongside NoSQL for document data
Alternatives
- PostgreSQL with JSONB — Relational integrity plus document flexibility — best of both worlds for most use cases
- NewSQL (CockroachDB, TiDB) — Horizontal scaling with full SQL and ACID transactions
- Polyglot persistence — Use the right database for each data type — SQL for transactions, NoSQL for documents, Redis for cache
This analysis is wrong if:
- Teams using NoSQL for relational data report fewer data quality incidents than SQL teams over 2 years
- Application-level joins in NoSQL are consistently faster than database-level joins in SQL for complex queries
- NoSQL schema flexibility reduces total development time compared to SQL with migrations over 18 months
- 1.Sarah Mei: Why You Should Never Use MongoDB
Classic analysis of how MongoDB's document model fails for relational data
- 2.Martin Kleppmann: Designing Data-Intensive Applications
Comprehensive analysis of database tradeoffs including consistency models and their real-world implications
- 3.Jepsen: Distributed Systems Safety Research
Independent testing revealing consistency violations in popular NoSQL databases under failure conditions
- 4.Uber Engineering: Why Uber Moved from Postgres to MySQL
Even at Uber's scale, relational databases were preferred — the move was about replication, not NoSQL
This is a mirror — it shows what's already true.
Want to surface the hidden consequences of your engineering decisions?