Table of Contents
In this article, you just review and test your understanding about transaction processing.
Before you continue, we assume that you have read the main article.
Transaction Processing in DBMS: Concepts, Properties, and Examples
Concept Overview
Transaction
A transaction represents a real-life event that work as a single unit of work. Each transaction is a set of database operations such as read, write, and update.
Examples of transaction:
- Sending Rs 1000 from A’s account to B’s account.
- Withdrawing cash from ATM.
- Buy movie ticket online.
All of these can be broken down into database operations.
Transaction State
The transaction goes through 6 different states. The list of states given below.
- Active State – The first state of transaction to begin a transaction and complete all operations except the last one.
- Pre-Committed State – The state at which last operation is completed, but changes are stored in a buffer memory, not on disk.
- Committed State – All changes committed to disk and stored permanently.
- Failed State – If failure occur during Active state or Pre-committed state due to software or a hardware failure. Transaction enters failed state.
- Abort State – All changes made are rolled back to bring database to a consistent state.
- Terminated state – Transaction has nothing more to do, it is removed from the system.

ACID Properties in DBMS
ACID properties ensures that database transactions are reliable, accurate, and fail safe.
A transaction could fail anytime and database will go to an inconsistent state.
A transaction can fail due to :
- Power failure
- System crash
- Conflict in transactions during concurrent access.
- Partial execution of transactions.
The ACID properties ensure that database transactions follow strict rules to stay consistent.
- Atomicity – Transaction should complete or do nothing at all.
- Consistency – Transaction should start with a consistent database and leave database consistent.
- Isolation – Each transaction should run in isolation as if it is the only transaction. This will ensure that there is no conflict among concurrent transactions.
- Durability – Once transaction is committed, the changes are permanent. No system failure can erase it.
SQL and Transaction Processing
In SQL , there are three commands for transaction processing;
- BEGIN or BEGIN TRANSACTION
- COMMIT
- ROLLBACK
Transaction Logs
- Transaction logs work with buffer and keep all the changes from transaction.
- It help database to recover quickly using a checkpoint.
- The transaction log contains
- Transaction ID
- Operation Records
- Undo/Redo Information
- Long Sequence Number (LSN)
- Commit or Rollback Records
- Checkpoint Records
Multiple Choice Questions
Q1. Which ACID property ensures that a transaction is either fully completed or not executed at all?
Atomicity ensures that all operations of a transaction are executed completely or none are executed.
Q2. Which ACID property ensures that database constraints are not violated?
Consistency ensures that the database moves from one valid state to another.
Q3. Which problem is prevented by the Isolation property?
Isolation prevents concurrent transactions from reading uncommitted data.
Q4. Durability ensures that:
Durability guarantees that committed changes are not lost even after failures.
Q5. ACID properties are mainly required to ensure:
ACID properties ensure correctness and reliability of transactions.
Short Questions
Q1. Define Atomicity in DBMS.
Q2. Why is Isolation required in transaction processing?
Q3. What is the role of Durability in DBMS?
This article covers the key concepts and practice questions. For a structured, exam-focused revision with:
- Concept summaries
- MCQs with answers
- Short exam questions with solutions
👉
Access the PDF (India)
International students:
available on Gumroad