Database Transaction recovery

What is a transaction in DBMS?

  • A transaction in DBMS involves write and read operations in common.
  • A transaction starts by execution of ‘COMMIT or ROLLBACK’ operation.
  • COMMIT is the final update operation.

commit:

  • A commit denotes the end point of logical work unit of database, and this really means the correct point of database.
  • If a transaction gets committed, the database is in correct or a consistent state.

ROLLBACK:

  • ROLLBACK on contrast helps in rolling back the database back to the previous state in which it was at the beginning of transaction i.e back to the past commit point.

 

The important properties of a database : ACID properties

Atomicity:

The database transactions are all atomic which means that either all the transaction series occurs or none occurs at all.

Correctness:

The transactions will transform the correct database state into other state without essentially conserving correctness at intermediate points.

Isolation:

All the transactions are completely isolated from each other.

Even there are multiple transactions that run concurrently, the transaction update of any particular transaction could be kept isolated (concealed) from the rest until this particular transaction get committed.

Durability:

Once the transaction gets committed, the updates yet remain in the database even after a system failure or a system crash.