Four characteristics of database things-acid

Source: Internet
Author: User

Transactional: atomicity, consistency, separation, persistence

A thing (transaction) is an execution unit that consists of a sequence of column operations, which are either done or not, and are an inseparable unit of work.

Four basic properties of a Database Thing (ACID)

1. atomicity (atomicity)

It means that all the actions contained in the thing are either done entirely or not (all or none).

For example, a bank withdrawal transaction is divided into 2 steps (1) passbook reduction (2) to withdraw cash. It is impossible to reduce money in a passbook without withdrawing cash. 2 steps must be completed or not completed at the same time.

2. Consistency (consistency)

Before things start, the database is in a consistent state, and when things end, the database must be in a consistent state.

In the case of bank transfers, consistency requires that the execution of a transaction should not change the sum of the sums of two accounts in a and B. Without this consistency, money will be out of the box, or it may be missing. A transaction should transition a database from one consistent state to another consistent state.

3. Isolation (Isolation)

Separation refers to the concurrency of transactions that are isolated from each other. That is, the operations within a transaction and the data being manipulated must be blocked from being seen by other transactions attempting to modify it. The execution of multiple concurrent transactions that manipulate the same shared object can cause an exception if there is no control over the concurrent cross-executing transactions.

For any pair of transactions T1 and T2, in the case of a transaction T1, the T2 either executes before the T1 starts or executes after the T1 is complete, so that each transaction does not feel that there is concurrent transaction execution in the system.

4. Persistence (Durability)

Persistence means that updates to committed transactions cannot be lost when a system or media failure occurs. That is, once a transaction commits, the DBMS guarantees that its changes to the data in the database should be permanent, that is, the update to the committed transaction can be restored. Persistence is ensured through database backup and recovery.

Four characteristics of database things-acid

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.