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