Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
ACID
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
=== Consistency failure === Consistency is a very general term, which demands that the data must meet all validation rules. In the previous example, the validation is a requirement that {{math|{{var|A}} + {{var|B}} {{=}} 100}}. All validation rules must be checked to ensure consistency. Assume that a transaction attempts to subtract 10 from {{var|A}} without altering {{var|B}}. Because consistency is checked after each transaction, it is known that {{math|{{var|A}} + {{var|B}} {{=}} 100}} before the transaction begins. If the transaction removes 10 from {{var|A}} successfully, atomicity will be achieved. However, a validation check will show that {{math|{{var|A}} + {{var|B}} {{=}} 90}}, which is inconsistent with the rules of the database. The entire transaction must be canceled and the affected rows rolled back to their pre-transaction state. If there had been other constraints, triggers, or cascades, every single change operation would have been checked in the same way as above before the transaction was committed. Similar issues may arise with other constraints. We may have required the data types of both {{var|A}} and {{var|B}} to be integers. If we were then to enter, say, the value 13.5 for {{var|A}}, the transaction will be canceled, or the system may give rise to an alert in the form of a trigger (if/when the trigger has been written to this effect). Another example would be integrity constraints, which would not allow us to delete a row in one table whose primary key is referred to by at least one [[foreign key]] in other tables.
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)