what is difference between atomicity and isolation in ACID properties?

Viewed 2103

the difference between atomicity and isolation of DBMS is somewhat vague so i am asking for a clear difference between the two ?

Atomicity and isolation, are ensured in classical database transactions by using a commit protocol. This protocol is used to turn temporary storage into permanent storage - that is, the updates to the transaction's data are not visible until the commit protocol validates the stored data. Note that it is the presence of a commit record in the database log which effectively validates the transaction's data.

2 Answers

Atomicity describes the behavior within an individual transaction, and Isolation describes the behavior among one or more transactions.

Atomicity: Either all of the database operations in a transaction are executed or none are.

Isolation: Each transaction appears to execute in isolation from other transactions.

Atomicity: all operations in a transaction are executed as a single unit.

Isolation: transactions don't see intermediate changes of other transactions.

According to these definitions, Isolation is just a part of Atomicity. Because when other transactions can see intermediate impact of our transaction, operations of our transaction cannot be considered as a single atomic unit.

Related