Generated by GPT-5-mini| ACID (atomicity) | |
|---|---|
| Name | ACID (atomicity) |
| Domain | Computer Science; Database Systems |
| First appeared | 1978 |
| Inventor | Jim Gray |
| Related | ACID (database); Transaction processing; Two-phase commit protocol |
ACID (atomicity) Atomicity is one of the four ACID properties that govern reliable Transaction processing in Database management systems. It ensures that a transaction executes as an indivisible unit so that either all operations commit or none do, preserving integrity in the face of system crashes, power outages, and concurrent access. Atomicity interacts closely with protocols and mechanisms developed in IBM research, Microsoft practices, and standards such as SQL and X/Open XA.
Atomicity requires that a sequence of operations is treated as a single unit of work under the rules defined by Jim Gray and collaborators in the context of Transaction processing. The principle is often summarized by the phrase "all-or-nothing," which was formalized alongside consistency, isolation, and durability in the ACID model discussed in SIGMOD and VLDB literature. Atomicity is enforced through primitives specified in SQL:2003, ODBC standards, and APIs provided by platforms like Oracle Database, Microsoft SQL Server, PostgreSQL, and MySQL.
In relational database engines such as Oracle Database, IBM Db2, Microsoft SQL Server, PostgreSQL, and MySQL, transactions encapsulate SQL statements and use transaction logs, lock managers, and recovery subsystems originating from research at IBM Research and implementations at Ingres and Sybase. Application servers such as WebSphere, JBoss, Apache Tomcat, and .NET Framework coordinate atomic operations across resources using standards like Java Transaction API and X/Open XA to ensure atomic commits across multiple resource managers.
Common techniques to implement atomicity include write-ahead logging (WAL), shadow paging, and commit protocols. WAL was popularized in systems influenced by Berkeley DB and adopted in PostgreSQL and SQLite, while shadow paging appears in systems influenced by Ingres design. For distributed atomicity, protocols such as the Two-phase commit protocol (2PC) and Three-phase commit were developed from SRI International and X/Open work to coordinate distributed transactions across heterogenous resource managers. Optimizations and variants include Presumed abort, Presumed commit, and heuristics used in Microsoft Distributed Transaction Coordinator.
Atomicity must tolerate failures including application crashes, coordinator failures, network partitions like those studied in CAP theorem discussions, and storage device faults analyzed in IEEE and USENIX research. Recovery mechanisms rely on redo/undo logs, checkpoints, and compensating transactions; these approaches are implemented in Oracle Database's recovery manager, PostgreSQL's crash recovery, and MySQL's InnoDB engine. Distributed failures that break atomicity are addressed via coordinator election using algorithms from Paxos and Raft literature or by employing idempotent operations described in REST and SOAP architectural patterns.
Atomicity is tightly coupled with consistency because an atomic commit must leave the system in a consistent state as constrained by schemas and integrity rules defined in SQL and by application-level invariants discussed in Domain-driven design. Atomicity interacts with isolation levels such as Serializable and Snapshot isolation defined in ANSI SQL and with durability guarantees provided by stable storage subsystems used in Amazon Web Services, Google Cloud Platform, and Microsoft Azure deployments.
Providing atomicity imposes overhead due to logging, locking, and coordination. Systems trade atomic guarantees against latency and throughput; for example, distributed databases like Cassandra and Riak often relax strict atomicity in favor of availability and partition tolerance as explored in Brewer's conjecture and Eventual consistency literature. Techniques like group commit, asynchronous replication in PostgreSQL replication, and optimistic concurrency control as used by SAP HANA and VoltDB mitigate performance costs while preserving atomic semantics in many practical workloads.
Atomic transactions are fundamental in domains such as banking, e-commerce (platforms like Amazon (company), eBay), and telecommunications billing systems developed by vendors like Ericsson and Nokia. Use cases include funds transfer operations in SWIFT-connected systems, order processing in SAP SE implementations, and inventory management integrated with Salesforce or Oracle E-Business Suite. Atomicity is also crucial in distributed ledger prototypes and some blockchain systems when coordinating off-chain state changes with on-chain commitments.