JAVA transaction attribute ACID; java transaction attribute acid
ATOMICITY ):
A transaction must be completely completed or canceled without ambiguity. When an error occurs in any operation, the effect of all operations that constitute the transaction must be revoked, and the data should be rolled back to the previous state.
CONSISTENCY ):
A transaction should protect all attributes defined on the data (such as integrity constraints ). When a successful transaction is completed, the data should be consistent. In other words, a transaction should convert the system from a consistent-state to another consistent state. For example, in the case of relational databases,
A consistent transaction will protect all integrity constraints defined on the data.
ISOLATION (ISOLATION ):
Multiple transactions can be concurrently executed in the same environment, and each transaction should be executed independently. The effects of serial execution of a series of transactions should be the same as that of concurrent execution. 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 cannot operate on the same data item. Database management systems usually use locks to implement this feature.
DURABILITY ):
The effect of a completed transaction should be persistent.