Transaction characteristics of the database

Source: Internet
Author: User

transactions Four features: atomicity, consistency, separation, persistence

(1) atomicity
The atomicity of a transaction means that the program contained in the transaction acts as a logical unit of work for the database, and it does all of the data modification operations, Or do not execute at all. This characteristic is called atomicity. The atomicity of the
Transaction, if a transaction can be thought of as a program, is either completely executed or not executed at all. This means that the manipulation sequence of a transaction is either fully applied to the database or does not affect the database at all. This characteristic is called atomicity.
If the user completes an update to the database within a transaction, all updates must be visible to the outside world or not updated at all. The former says the transaction has been committed and the latter says the transaction was withdrawn (or aborted). dbms You must ensure that all manipulations completed by a successfully committed transaction are fully reflected within the database, and that failed transactions have no effect on the database at all.

(2) Consistency

the protection of all semantic constraints in the consistency processing database. If the state of the database satisfies all integrity constraints ( ), it says that the database is consistent. For example, when a database is in a consistent state of S1, a transaction is executed against the database, assuming that the state of the database is inconsistent during transaction execution, and that the database is in a consistent state S2 at the end of the transaction execution.
 
(3) separation
Span style= "COLOR: #0000ff" > separation refers to concurrent transactions being 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 separation is dbms DBMS (Database management System) You can provide different levels of separation between concurrently executed transactions by locking. 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.
   The DBMS can provide different levels of separation between the concurrently executing transactions. There is an inverse relationship between the level of separation and the throughput of concurrent transactions. The separation of more transactions can lead to higher conflicts and more transactional miscarriages. The aborted transaction consumes resources that must be re-accessed. Therefore, it is necessary to make sure that the high separation level of the DBMS requires more overhead.

(4) Durability
Persistence means that updates to committed transactions cannot be lost when a system or media failure occurs. That is, once a transaction is committed, the DBMS guarantees that its changes to the data in the database should be permanent and can withstand any system failure. Persistence is ensured through database backup and recovery.
Persistence means that updates to committed transactions cannot be lost when a system or media failure occurs. That is, the update to the committed transaction can be resumed. Once a transaction is committed, the DBMS must ensure that appropriate redundancy is provided to withstand the failure of the system. Therefore, persistence is primarily the recovery performance of the DBMS.

Transaction characteristics of the database

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.