Abbreviations of four basic elements for correct execution of acid database transactions

Source: Internet
Author: User

Acid refers to the abbreviation of four basic elements for correct execution of database transactions. Includes: atomicity, consistency, isolation, and durability ). A database system that supports transactions must have these four features. Otherwise, data correctness cannot be ensured in the transaction process (transaction processing, the transaction process cannot meet the requirements of the transaction party.

Atomicity

All the operations in the entire transaction are either completed or not completed, and it is impossible to stop at a stage in the middle. When a transaction encounters an error during execution, it will be rolled back to the state before the start of the transaction, just as this transaction has never been executed.

Consistency

The integrity constraints of the database are not damaged before and after the transaction starts.

Isolation

The execution of two transactions does not interfere with each other. One transaction cannot see the data at a certain time in the middle of another transaction.

Durability

After the transaction is completed, the changes made by the firm to the database are permanently stored in the database and will not be rolled back.

Because an operation usually contains many sub-operations, these sub-operations may cause problems due to hardware damage or other factors, it is not easy to implement acid correctly. Acid recommends that the database complete all the data to be updated and modified at one time, but it is not feasible.

At present, there are two main ways to implement acid: the first is write Ahead Logging, that is, the log method. The second type is shadow paging.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.