Middle
What is consistency and atomicity?
sobes.tech AI
Answer from AI
Consistency (integrity) is a property of a transaction that transfers a database from one correct state to another, while preserving all predefined integrity rules. Even during concurrent transactions or failures, the data in the database remains consistent.
Atomicity is a property of a transaction that guarantees that the transaction will either be fully completed or fully rolled back. There are no intermediate states. If any part of the transaction cannot be completed, the entire transaction is canceled (rollback), and the database is restored to its state before the transaction began. This is the "all or nothing" principle.