Consistency is the ACID property that requires a database transaction to move the database from one valid state to another. “Valid” means its integrity rules still hold after the transaction. Reliability therefore depends not just on completing operations, but on preserving the rules that make the stored data meaningful. section 6.1.1
Those rules can exist at two levels:
- Transaction-level consistency: the database accepts only transactions that obey its predefined rules, such as foreign key constraints and data type requirements. section 6.1.1
- Application-level consistency: a valid state may also depend on a business invariant, such as a required condition on customer balances. Database constraints alone do not necessarily define every such rule. section 6.1.1
A balanced financial transaction
Suppose a financial transaction must keep debits equal to credits. That balance is an invariant to check across the transaction. Atomicity answers a different question: if one step of a transfer fails, are all its steps rolled back? Both properties matter, but “all or nothing” does not itself state which resulting balances are valid. section 5.2.4 section 6.1.1
Do not confuse ACID consistency with consistency in CAP or PACELC. CAP uses the word for reads that receive the most recent write or an error; PACELC examines trade-offs involving that distributed-system guarantee during partitions and normal operation. ACID consistency instead asks whether transactions preserve valid states. Property-based testing can help check invariants across randomized inputs, including at the system level. section 6.1.1 section 6.2 section 6.3 section 5.2.4



























