Strong Consistency by Default
You'll learn: Why relational databases guarantee that every read immediately reflects the latest committed write, giving you predictable data access without extra effort.
What Is Strong Consistency?
In relational databases (SQL databases like PostgreSQL, MySQL, Oracle), strong consistency means that once a transaction commits successfully, every subsequent read will see that new data immediately. There's no waiting period, no stale data, no surprises—what you write is what you get.
This happens by default. You don't configure it. You don't enable a special mode. It's the fundamental promise of the relational model.
Why This Matters
Imagine you're depositing money into your bank account. You submit the transaction, it confirms, and you immediately refresh your balance. With strong consistency, you always see the updated balance. The database doesn't show you an old value from five seconds ago.
Compare this to systems with eventual consistency (which we'll explore later in NoSQL contexts), where a read immediately after a write might still return the old value for a brief period. Those systems trade consistency for other benefits like availability or partition tolerance.
How It Works Under the Hood
Relational databases achieve this through:
- Write-ahead logging ensuring durability
- Lock-based concurrency control preventing dirty reads
- Transaction isolation levels coordinating concurrent operations
- Single-leader architecture (in primary-replica setups) where writes go to one source of truth
The Trade-Off
Strong consistency comes at a cost: latency and availability. Every write must be confirmed and durable before returning success. In distributed scenarios, this can mean waiting for acknowledgments, which may slow things down or limit horizontal scaling.
Key Takeaway: Relational databases provide strong consistency by default—reads always reflect committed writes immediately, making them ideal for applications where accuracy cannot be compromised, like financial systems or inventory management.