Atomicity (database systems)

atomicityatomicatomic transactionatomicallytransactionalA'''tomicityatomic operationsatomic transactionsatomic updateatomic updates
In database systems, atomicity (from ) is one of the ACID (Atomicity, Consistency, Isolation, Durability) transaction properties.wikipedia
81 Related Articles

ACID (computer science)

ACIDACID transactionsAtomicity, consistency, isolation, durability
In database systems, atomicity (from ) is one of the ACID (Atomicity, Consistency, Isolation, Durability) transaction properties. Atomicity does not behave completely orthogonally with regard to the other ACID properties of the transactions.
In computer science, ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties of database transactions intended to guarantee validity even in the event of errors, power failures, etc. In the context of databases, a sequence of database operations that satisfies the ACID properties (and these can be perceived as a single logical operation on the data) is called a transaction.

Database transaction

transactiontransactionstransactional
In database systems, atomicity (from ) is one of the ACID (Atomicity, Consistency, Isolation, Durability) transaction properties.
A database transaction, by definition, must be atomic, consistent, isolated and durable.

Read-copy-update

RCUread-copy update (RCU)
Typically, systems implement Atomicity by providing some mechanism to indicate which transactions have started and which finished; or by keeping a copy of the data before any changes occurred (read-copy-update).
This is in stark contrast with more traditional synchronization primitives such as locking or transactions that coordinate in time, but not in space.

Database

database management systemdatabasesdatabase systems
In database systems, atomicity (from ) is one of the ACID (Atomicity, Consistency, Isolation, Durability) transaction properties.
The acronym ACID describes some ideal properties of a database transaction: atomicity, consistency, isolation, and durability.

Durability (database systems)

durabilitydurableD'''urability
In database systems, atomicity (from ) is one of the ACID (Atomicity, Consistency, Isolation, Durability) transaction properties.
Atomicity

Isolation (database systems)

isolationtransaction isolationisolated
In database systems, atomicity (from ) is one of the ACID (Atomicity, Consistency, Isolation, Durability) transaction properties. For example, isolation relies on atomicity to roll back changes in the event of isolation failures such as deadlock; consistency also relies on rollback in the event of a consistency-violation by an illegal transaction.
Atomicity

Journaling file system

journalingjournaljournaled
Several filesystems have developed methods for avoiding the need to keep multiple copies of data, using journaling (see journaling file system).
The changes are thus said to be atomic (not divisible) in that they either succeed (succeeded originally or are replayed completely during recovery), or are not replayed at all (are skipped because they had not yet been completely written to the journal before the crash occurred).

Long-running transaction

Saga Transactions
Long-running transaction
Long-running transactions (also known as the saga interaction pattern ) are computer database transactions that avoid locks on non-local resources, use compensation to handle failures, potentially aggregate smaller ACID transactions (also referred to as atomic transactions), and typically use a coordinator to complete or abort the transaction.

Linearizability

atomicatomic operationatomicity
The hardware level requires atomic operations such as Test-and-set, Fetch-and-add, Compare-and-swap, or Load-Link/Store-Conditional, together with memory barriers.
(ACID databases refer to this principle as atomicity.) If the operation fails (usually due to concurrent operations), the user must retry, usually performing a different operation.

Consistency (database systems)

Consistencyinconsistentconsistent
In database systems, atomicity (from ) is one of the ACID (Atomicity, Consistency, Isolation, Durability) transaction properties. For example, isolation relies on atomicity to roll back changes in the event of isolation failures such as deadlock; consistency also relies on rollback in the event of a consistency-violation by an illegal transaction.

Data consistency

consistencyconsistency of the dataconsistent state
An example of an atomic transaction is a monetary transfer from bank account A to account B. It consists of two operations, withdrawing the money from account A and saving it to account B. Performing these operations in an atomic transaction ensures that the database remains in a consistent state, that is, money is neither lost nor created if either of those two operations fail.

Orthogonality

orthogonalorthogonallylogically orthogonal
Atomicity does not behave completely orthogonally with regard to the other ACID properties of the transactions.

Deadlock

livelockdeadlocksdeadly embrace
For example, isolation relies on atomicity to roll back changes in the event of isolation failures such as deadlock; consistency also relies on rollback in the event of a consistency-violation by an illegal transaction.

Metadata

meta datameta-datacommunications metadata
The system synchronizes the logs (often the metadata) as necessary after changes have successfully taken place.

Operating system

operating systemsOScomputer operating system
Ultimately, any application-level implementation relies on operating-system functionality.

POSIX

POSIX compatiblePOSIX standardixemul.library
At the file-system level, POSIX-compliant systems provide system calls such as and that allow applications to atomically open or lock a file.

System call

syscallcallaccess
At the file-system level, POSIX-compliant systems provide system calls such as and that allow applications to atomically open or lock a file.

POSIX Threads

pthreadspthreadlibpthread
At the process level, POSIX Threads provide adequate synchronization primitives.

Test-and-set

Test and Setperformance sectionTAS
The hardware level requires atomic operations such as Test-and-set, Fetch-and-add, Compare-and-swap, or Load-Link/Store-Conditional, together with memory barriers.

Fetch-and-add

Fetch and Incrementfetch_and_inc
The hardware level requires atomic operations such as Test-and-set, Fetch-and-add, Compare-and-swap, or Load-Link/Store-Conditional, together with memory barriers.

Compare-and-swap

compare and swapCASCMPXCHG16B
The hardware level requires atomic operations such as Test-and-set, Fetch-and-add, Compare-and-swap, or Load-Link/Store-Conditional, together with memory barriers.

Load-link/store-conditional

LDREX/STREXLL/SCload linked, store conditional
The hardware level requires atomic operations such as Test-and-set, Fetch-and-add, Compare-and-swap, or Load-Link/Store-Conditional, together with memory barriers.

Memory barrier

instructionbarriersfences
The hardware level requires atomic operations such as Test-and-set, Fetch-and-add, Compare-and-swap, or Load-Link/Store-Conditional, together with memory barriers.

Hyper-threading

hyperthreadinghyper-threadedHT
Portable operating systems cannot simply block interrupts to implement synchronization, since hardware that lacks concurrent execution such as hyper-threading or multi-processing is now extremely rare.

Multiprocessing

multiprocessormulti-processormulti-processing
Portable operating systems cannot simply block interrupts to implement synchronization, since hardware that lacks concurrent execution such as hyper-threading or multi-processing is now extremely rare.