Transaction Recovery After Rollback: Commit vs Rollback vs Flashback vs Redo

Transaction Recovery After Rollback: Commit vs Rollback vs Flashback vs Redo

Verified Sources
Sep 13, 2026

In database systems, rollback undoes the effects of a transaction that has not been committed (or reverts changes within the scope of a failed/aborted operation), while redo is part of the recovery process used to re-apply changes after a failure (e.g., during crash recovery). Flashback features allow you to view or revert to a prior state using specialized mechanisms rather than a traditional rollback. Commit finalizes a transaction so its changes become durable and are not undone by rollback.

For the question: “Which of the following is used to get back all the transactions back after rollback?” the best answer among the options is (iv) Redo, because redo is used to restore/re-apply changes during recovery so that the system returns to the correct state after undo/rollback-type steps in the recovery workflow.

Key terms introduced next: Rollback Redo Flashback Commit.

Database Transactions: Commit vs Rollback (Crash Recovery Intuition)

Conceptual recovery model (Undo vs Redo)

Many recovery approaches can be understood as separating “undoing wrong/unwanted effects” from “re-applying correct effects.” In that mental model:

  • Rollback/Undo addresses the effects of transactions that should not remain (e.g., aborted work).
  • Redo ensures the effects that must persist (e.g., committed work, or changes recorded in logs) are re-applied to reach the correct database state after failure.

This aligns with how exam questions usually test transaction recovery: after rollback/undo, the mechanism that “gets back” the intended history is redo.

Transaction Lifecycle & Recovery Phases (High-Level)

Transaction runs

1. Execute

Operations are performed and tracked (often via logs)."

Commit succeeds

2. Commit path

Changes become durable; later recovery should preserve them."

Rollback/undo

3. Rollback path

Changes from aborted/uncommitted work are reversed."

Redo reapplies

4. Recovery finishing

Re-applies logged changes to reach a consistent state."

How redo “restores” state after rollback/undo (process view)

  1. 1
    Step 1

    Use logs to determine what must be undone and what must be preserved.

  2. 2
    Step 2

    Revert the effects of transactions that should not remain (e.g., uncommitted).

  3. 3
    Step 3

    Re-apply logged updates for transactions/operations that must be reflected in the final correct state.

  4. 4
    Step 4

    Database returns to a state that satisfies the recovery correctness criteria.

Which option matches “get back all transactions back after rollback?”

Interpretation based on recovery roles (conceptual, exam-style).

Exam shortcut

If the question mentions rollback/undo and asks what brings the system back to the correct state using recovery mechanics, the expected answer is typically Redo.

Don’t confuse rollback with commit

Rollback reverses changes; Commit finalizes them. After commit, rollback does not “get them back”—it can’t undo durable changes in the normal semantics. Recovery uses redo/undo rather than commit acting as a “restore” button.

Quick comparisons for the four options

Transaction Recovery Flashcards

1 / 4
Question · Term

What does rollback (undo) do?

Click to reveal
Answer · Definition

Reverses changes from a transaction that should not persist (e.g., aborted/uncommitted work).

Knowledge Check

Question 1 of 4
Q1Single choice

Which of the following is used to get back all the transactions back after rollback?