0% found this document useful (0 votes)
26 views10 pages

Database Transactions

Uploaded by

dhanrajkrbksc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views10 pages

Database Transactions

Uploaded by

dhanrajkrbksc
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

Transactions And

Recovery From
The Transaction
Failures

@ Dhanraj Kumar
Transactions and its
operations

1 Read 2 Write
Access data from the Modify data in the
database. database.

3 Commit
Make changes permanent.
Acid Properties

Atomicity Consistency Isolation Durability


All operations within a Transactions maintain Transactions are isolated Committed changes are
transaction succeed or fail database integrity. from each other. permanent.
together.
Transaction State

1 Active
The transaction is in progress, executing operations.

2 Partially Committed
The transaction has completed all operations but hasn't been
committed yet.

3 Committed
The transaction is successfully completed, changes are permanent.

4 Aborted
The transaction is rolled back due to an error, changes are undone.
Schedules And Its Types
Serial Schedule Parallel Schedule
Transactions are Transactions are
executed one after executed
another in a specific simultaneously,
order. interleaved.
Serializibility

A concurrent schedule is serializable if it


produces the same results as some serial
schedule.
Conflict Serializable Schedule

A schedule is conflict serializable if it can be


transformed into a serial schedule by
rearranging non-conflicting operations.
View Serializable Schedule

A schedule is view serializable if each


transaction sees a consistent view of the
database, as if it were executed serially.
Recovery from transaction
failures techniques
Checkpoint
Periodically saves the database state to the
disk, minimizing recovery time.

Undo/Redo
Rollback uncommitted changes and redo
committed changes to ensure consistency.
Thank You !!

You might also like