Suggest an editImprove this articleRefine the answer for “What does consistency mean?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)Consistency is a transaction property meaning that before and after it runs, the data must be in a correct, non-contradictory state that follows the system's rules: constraints, schemas, validations, uniqueness, referential integrity, and business logic. **Key point:** a transaction can't save data that violates a rule (e.g. a unique index or a foreign key) - the system moves from one consistent state to another consistent state.Shown above the full answer for quick recall.Answer (EN)ImageConsistency is a transaction property meaning that **before and after it runs, the data must be in a correct, non-contradictory state**, one that follows the system's rules: constraints, schemas, validations, uniqueness, referential integrity, and business logic. ### What this guarantees - a transaction **can't save data that violates the rules** (e.g. a unique index or a foreign key) - the system **moves from one consistent state to another consistent state** - **the data can't be "broken"** even by failures partway through the process (together with Atomicity) ### An example There's a rule: an account balance can't go negative. If a transaction tries to withdraw more than the account holds, it **won't be committed**, because that would break consistency. In SQL, this might be enforced by: - `CHECK` constraints - `UNIQUE` - `FOREIGN KEY` - triggers - business-logic validators ### In one sentence **Consistency = "after a transaction, the data must stay logically correct and not violate the system's integrity rules".**For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.