python-database MySQL

Source: Internet
Author: User

Vi. Business

    • Transactions are supported in MySQL only for databases or tables that use the InnoDB database engine
    • Transactions can be used to maintain the integrity of the database, to ensure that a batch of SQL statements are either all executed or not executed
    • Transactions are used to manage insert,update,delete statements

6.1 Features of the transaction:

    • 1. atomicity of a transaction: a set of transactions, either successful or withdrawn.
    • 2, stability : There is illegal data (foreign key constraints and the like), transaction recall.
    • 3. Isolation: The transaction runs independently. The result of one transaction affects other transactions, and then other transactions are recalled. The 100% isolation of a transaction requires a sacrifice of speed.
    • 4, reliability: After the hardware and software crashes, the INNODB data table driver will use the log file to reconstruct the changes.
Using transactions in the MySQL console to manipulate
begin ; Insert  into Values (555); rollback;

Of course, if the above data is not a problem, enter commit to submit the command on the line;

python-database MySQL

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.