Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 9

Transactions in Database

Management Systems
Transactions are fundamental in database management systems, ensuring data integrity and reliability.
Transaction States
Active 1
The transaction is executing and
making changes to the database.
2 Partially Committed
The transaction has finished
execution but not yet committed.
Committed 3
The transaction has successfully
completed and its changes are
permanent.
Committed Transactions
1 Permanent 2 Isolation 3 Durability
Changes
Committed Committed
Committed transactions are transactions' effects
transactions' changes isolated from other persist even after
become permanent in transactions. system failures.
the database.
Aborted Transactions
Failure to Commit Causes Isolation

Aborted transactions do not Aborted transactions can be Aborted transactions are


successfully complete. caused by errors, deadlocks, isolated from other
or explicit rollbacks. transactions.
Changes are rolled back to
the previous state. Their changes are not visible
to other transactions.
Pending Transactions
Partially Executed Isolation Eventual Outcome
Pending transactions have Pending transactions are Pending transactions can
started execution but not isolated from other either commit or abort.
completed. transactions.
Rollback and Commit Operations
Rollback
Undoes all changes made by a transaction.

Partial Rollback
Rollback to a specific savepoint within a transaction.

Commit
Permanently applies all changes made by a transaction.
Importance of Transaction Management

Data Integrity Concurrency Fault Tolerance Data


Control Consistency
Transactions ensure Transactions enable
data remains in a Transactions provide recovery from Transactions
valid state. isolation between failures and errors. maintain consistency
concurrent of the database state.
operations.

You might also like