Monday, February 7, 2011

Differences between the COMMIT and ROLLBACK commands

 
COMMIT and ROLLBACK commands is significant because committing is always faster than rolling back.
What happens when a change is made to data in a table?Redo log entries are written, storing log entries for data that is about to be changed.
The database is changed, modifying the current value of data in tables.
Rollback entries are created, storing a list of rollback entries to be applied in case a transaction is rolled back.
What happens when a COMMIT command is executed?
Rollback entries are deleted. Changes are already made. Nothing else is required.
What happens when a ROLLBACK command is executed?
Rollback entries are written to the redo logs, namely “undo” redo log entries.
Rollback is applied to the database undoing previously made changes.
Rollback entries are deleted.

No comments:

Post a Comment