Explain the steps involved in database access operations. Describe the acid properties with examples
Answers
ACID – Atomicity Consistency Isolation and Durability
Atomicity: All or None rule
Eg. If the user is trying to debit 500 from an account and credit in another account but for any reason the system got crashed after debiting the amount but before debiting .In this situation the debit operation will be canclled since the whole operation has not been completed.
Consistency –
Eg. Account T has 500 in the account and Account D has 200 in his account. An Amount of 200 is transferred from T to D. Then after performing the operation, it cross checks whether
Before transacting T + D = 500 + 200 = 700
After Transacting T + D = 300 + 400 = 700
Integrity: Takes care of concurrent operation.
Durability: Once the transaction is done, this makes sure that the updated data is written on the database to store permanently.