High-performance MySQL affairs (3)

Source: Internet
Author: User

High-performance MySQL transaction:

Concept: A transaction is a set of atomic SQL queries, a separate unit of work. Statements within a transaction either execute successfully or all fail.

Bank Transfer is a classic example of how important it is to explain business. For example: Customer A to transfer 200 yuan to Customer B, requires three steps:

1, check whether a account is enough 200 yuan.

2,a account minus 200 yuan.

3,b account increased 200 yuan.

These three steps must be packaged in one transaction, and any one step fails, you must roll back all the steps.

The concept of an empty-talk business is not enough, and the business must have four standard characteristics of acid.

Atomic Nature (atomicity), consistency (consistency), isolation (isolation), persistence (durability)

High-performance MySQL affairs (3)

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.