CBSE BOARD XII, asked by tanya8690, 1 year ago

difference between commit and rollback??​

Answers

Answered by thanjaivalavan
1

Answer:COMMIT operation save changes made in a transaction to the database while ROLLBACK undo those changes. Its observed, generally COMMIT is a faster process than a ROLLBACK operation.

Now question is how commit is faster?

First we need to understand what occurs in database when we select COMMIT or ROLLBACK operation.

When we start a transaction, the data is being written to database and all pages marked as DIRTY pages, means three operation performed here as

The database is changed.

Log has been written

Rollback is written.

But when we go for COMMIT operation, All DIRTY pages will be written to disk and ROLLBACK deleted, and in case of ROLLBACK operation, all changed pages rollback will be written to log file again and delete from database as before a COMMIT or ROLLBACK all changes being stored in the database. The COMMIT command simply removes any recourse to undoing the changes and ROLLBACK executes everything in revers

Similar questions