0
1.6kviews
List ACID properties. Explain usefulness of each.

Mumbai University > Information Technology > Sem 3 > Database Management System

Marks: 10M

Year: Dec 2014

1 Answer
0
4views

A database guarantees the following four properties to ensure database reliability, as follows:

Atomicity:

A database follows the all or nothing rule, i.e., the database considers all transaction operations as one whole unit or atom. Thus, when a database processes a transaction, it is either fully completed or not executed at all. Suppose A is transferring $100$ to B's account. Computers are electronic device and are prone to failure. Assume A has initially $300$ and B has $500$. Now it may happen that when A has initiated the transfer, in the midst of transferring from A to B, system fail. Now balance is deducted from A's account but has not been added to B's account. Hence we need either the transaction occur fully or just revert back to initial state.

Consistency:

Ensures that only valid data following all rules and constraints is written in the database. When a transaction results in invalid data, the database reverts to its previous state, which abides by all customary rules and constraints. This must be totally ensured by the programmer. Referring to above example, this basically means sum of balances of both A's and B's account are same before and after transaction.

Isolation:

Ensures that transactions are securely and independently processed at the same time without interference, but it does not ensure the order of transactions. For example, user A withdraws $100$ and user B withdraws $250$ from user Z’s account, which has a balance of $1000$. Since both A and B draw from Z’s account, one of the users is required to wait until the other user transaction is completed, avoiding inconsistent data. If B is required to wait, then B must wait until A’s transaction is completed, and Z’s account balance changes to $900$. Now, B can withdraw $250$ from this $900$ balance.

Durability:

It may happen that even the transaction is successful, system fails. In the above example, user B may withdraw $100$ only after user A’s transaction is completed and is updated in the database. If the system fails before A’s transaction is logged in the database, A cannot withdraw any money, and Z’s account returns to its previous consistent state.

Please log in to add an answer.