Skip to content

Principles

Relational databases are designed around the principles of atomicity, consistency, isolation and durability of transactions. The distributed nature of NoSQL databases means that these principles cannot be guaranteed. In particular, consistency is sacrificed in favour of performance. This follows from Brewer's CAP theorem (Gilbert & Lynch, 2002), which says that only two out of the three principles of consistency, availability and partition tolerance are possible at any one time. The thinking is that if a database is spread across multiple partitions, then different partitions can receive conflicting commands. The principle of availability says that each should respond immediately, but that would lead to inconsistent responses; the principle of consistency would require the conflicts to resolved before replying which would take time thus reducing availability.

NoSQL databases are designed around an alternative set of principles known as BASE: Basically Available Soft state Eventually consistent. While ensuring that the system is basically available to any requests, a consistent state cannot be guaranteed and the state of the system is treated as soft - ie temporary inconsistencies are tolerated. The system eventually becomes consistent at some point, but this is typically the responsibility of the application developer rather than the database management system as it is in relational databases.

Pritchett (2008) provides a detailed illustration of the BASE approach using a worked example and the standard concepts from relational transactions.

Further reading:

Managing the Redo Log

Brewer's conjecture

BASE: An Acid Alternative