Transaction Recovery After Rollback: Commit vs Rollback vs Flashback vs Redo
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. ExecuteOperations are performed and tracked (often via logs)."
Commit succeeds
2. Commit pathChanges become durable; later recovery should preserve them."
Rollback/undo
3. Rollback pathChanges from aborted/uncommitted work are reversed."
Redo reapplies
4. Recovery finishingRe-applies logged changes to reach a consistent state."
How redo “restores” state after rollback/undo (process view)
- 1Step 1
Use logs to determine what must be undone and what must be preserved.
- 2Step 2
Revert the effects of transactions that should not remain (e.g., uncommitted).
- 3Step 3
Re-apply logged updates for transactions/operations that must be reflected in the final correct state.
- 4Step 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
Knowledge Check
Which of the following is used to get back all the transactions back after rollback?
Explore Related Topics
8051 Port 3 Alternate Functions: Identifying the Incorrect Option
Port 3 of the 8051 provides eight alternate pin functions (RXD/TXD, INT0/INT1, T0/T1, WR/RD), so the only option that does not belong to its alternate functions is internal interrupts.
- P3.0 = RXD and P3.1 = TXD for serial communication.
- P3.2 = INT0 and P3.3 = INT1 for external interrupts.
- P3.4 = T0 and P3.5 = T1 as timer external inputs.
- P3.6 = WR and P3.7 = RD for external memory control.
- Internal interrupts arise from on‑chip peripherals, not from any Port 3 pin.
Which Model Is Most Suitable for High-Risk Projects?
The Spiral Model is identified as the most suitable SDLC approach for high‑risk projects because it embeds explicit risk analysis and mitigation in every iterative cycle.
- It is a risk‑driven, iterative process that repeatedly plans, analyzes risks, engineers, and validates with stakeholders.
- Compared to Waterfall (low risk handling), Prototyping (moderate, focus on requirements), and Incremental (moderate, focus on staged delivery), Spiral offers the strongest formal risk management.
- Each loop aims to reduce unresolved risk, expressed as .
- Ideal for large, complex, uncertain, or mission‑critical systems where early risk identification is critical.
Concurrency Control: Short Notes (Database Transactions)