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;