atomicity
The property that a group of changes happens completely or not at all, with no half-finished state ever visible.
In more detail
A transfer between accounts that is atomic either debits and credits both sides or changes nothing. Databases, file systems and many APIs offer atomic operations so that a failure part-way through cannot leave data inconsistent.
Examples
In the browser: appending a DocumentFragment inserts all its nodes in one step, and IndexedDB transactions roll back every change if any request fails.The transfer demo restores the original balance when the second half of the transfer fails.Related terms
- DocumentFragment — A lightweight container for DOM nodes that is not part of the page, used to build many nodes and insert them all in one step.
- transaction — A group of database changes that succeed or fail together, so the data is never left half-updated.
- ACID — The four guarantees of a database transaction: atomicity, consistency, isolation and durability.
- rollback — Returning a system to a previous known-good version after a bad change.
- ROLLBACK — The SQL statement that ends a transaction by undoing every change made since it began.
Taught in
- DOM Manipulation: DocumentFragment And HTML Templates — Frontend Architecture & Web Platform
- IndexedDB In Practice: Object Stores, Indexes And Transactions — Frontend Architecture & Web Platform
- Database Access & Migrations: ORM & Data Layers — Production Full-Stack Engineering
- Optimistic UI Architecture: Cache & Rollback Protocols — Production Full-Stack Engineering
- Asynchronous Event Processing: Outbox Pattern & Queues — Production Full-Stack Engineering
- Full-Stack System Verification: Capstone Integration — Production Full-Stack Engineering
- Keys, Constraints And Referential Integrity — PostgreSQL, Indexing & Relational Data Modeling
- Transactions And ACID Properties — PostgreSQL, Indexing & Relational Data Modeling