Prerequisites
NoSQL: When Relational Wasn't Enough
How the scale demands of Web 2.0 drove a new generation of databases that traded SQL guarantees for horizontal scalability.
The Scale Wall
By the mid-2000s, companies like Google, Amazon, and Facebook were hitting the limits of relational databases. Sharding MySQL across hundreds of servers was possible but painful. The CAP theorem, formalized by Eric Brewer in 2000, crystallized the trade-offs: in a distributed system, you can have at most two of Consistency, Availability, and Partition tolerance.
The New Models
Different problems called for different data models:
| Database | Model | Optimized For |
|---|---|---|
| MongoDB | Document | Flexible schemas, rapid iteration |
| Redis | Key-Value | Sub-millisecond reads, caching |
| Cassandra | Wide-Column | Write-heavy, multi-datacenter |
| Neo4j | Graph | Relationship-heavy queries |
The Pendulum
NoSQL wasn’t a replacement for SQL — it was an expansion of the toolkit. Today, most production systems use both: PostgreSQL for transactional data, Redis for caching, Elasticsearch for search. The lesson: choose the data model that fits the access pattern.