Those things about the business

Source: Internet
Author: User

What is a transaction? Transactional critical in its atomicity. The concept of atomicity means that some things can be viewed as a unit of execution. Viewed from a database perspective. He refers to the smallest combination of one or more statements that should be executed all or not. When working with data, it is often ensured that something else happens. Or two things don't happen. It may actually reach a level of dozens of or more things that have to happen together or never happen. Take a look at a classic case. In this case, every major book is about business. You go to a bank to transfer money to a friend. Turned 100 dollars SQL is as follows: Your account has deducted 100 yuan, your friend account number adds 100 yuan. It looks perfect. In fact, there is a bug, your account has been deducted 100 yuan in the execution of your friend account plus 100 yuan, the data errors, did not add in.

Acid Transactions

If your system is designed to use acid transactions, the above situation does not occur. Acid Transactions

1. Atomicity: The transaction will be fully executed or not executed at all.

2. Consistency: All constraints and other database integrity rules need to be followed, and all related objects (data and index pages) are completely updated

3. Isolation: Every transaction is completely isolated from any other transaction. A transactional action is not disturbed by other transactional actions.

4. Persistence: After a transaction is completed, its effect is permanently stored inside the system. The data is "safe". This means that it does not occur in the event of a power outage or a system failure or a device failure that does not cause data to be written half.

Those things about the business

Related Article

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.