Properties of transactions in Java acid;

Source: Internet
Author: User

atomicity (atomicity):
a transaction is to be done or undone completely without ambiguity. In the case of an error in any operation, the effect of all operations that make up the transaction must be undone and the data should be rolled back to its previous state.

Consistency (consistency):
a transaction should protect all immutable attributes (such as integrity constraints) that are defined on the data. When a successful transaction is completed, the data should be in a consistent state. In other words, a transaction should shift the system from one consistent-state to another consistent state. For example, in the case of a relational database,
a consistent transaction will protect all integrity constraints that are defined on the data.

Isolation (Isolation):
There may be multiple transactions executing concurrently in the same environment, and each transaction should be performed independently. The effect of serially executing a series of transactions should be the same as executing them concurrently. This requires two things:

During the execution of a transaction, the intermediate (possibly inconsistent) state of the data should not be exposed to all other transactions.
two concurrent transactions should not be able to manipulate the same data. Database management systems typically use locks to implement this feature.

Persistence (Durability):
The effect of a completed transaction should be persistent.

Properties of transactions in Java 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.