ACID model
The relational database model for transactions are based on ACID properties, the term coined by Haerder & Reuter in 1983. This guarantees reliability, consistency and recoverability. It has four properties:
Atomicity
It is an ‘all or nothing’ approach. The transaction is performed in its entirety or not performed at all. Therefore if any part of the transaction fails it all fails and no change is made.
Consistency
The database transforms from one consistent state to another consistent state. The database cannot be left in an inconsistent state.
Isolation
Transactions execute independently of each other. This ensures that even if concurrent executions of transactions happen they are left in a state as if the transactions have executed serially. Partial and incomplete transactions should not be visible to other transactions.
Durability
Successful completed transactions are committed into the database and stored permanently. They persist after restarts.
New Patterns – CAP theorem
The concepts and patterns discussed in the paper ‘NoSQL Databases’ by Christof Strauch demonstrates the new concept to reduce complexity. The CAP-theorem was coined by Eric Brewer in 2000. It has three guarantees:
Consistency
The data is correct all of the time after the execution of an operation. A distributed system is typically considered to be consistent if, after an update operation, all readers see the updates in a shared data source.
Availability
It guarantees that data can be read and written all the time due to the architectural design and implementation.
Partition Tolerance
The system has the ability to continue to operate in the presence of a failure of part of the system.
BASE model
The concepts of NoSQL datastores use the BASE pattern. “The BASE approach according to Brewer forfeits the ACID properties of consistency and isolation in favour of “availability, graceful degradation, and performance” Strauch.
The acronym BASE is composed of the following characteristics:
Basic Availability
It uses replication techniques to reduce data unavailably. It is highly distributed and uses sharding and partitioning of data within its storage model.
Soft State
This allows data to be inconsistent and assumes that it is managed by the developer and not the database.
Eventual Consistency
At some point in the future the data will reach a consistent state. It is unknown when that will happen.
Brewer contrasts ACID with BASE Design Patterns considering the two concepts as a complementing spectrum.
NoSQL Databases article page 32 by Christof Strauch |