Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

DBMS notes of module 5 is available., Study notes of Database Management Systems (DBMS)

Notes of DBMS module 5 notes are there. Kindly inform if ay other notes are required

Typology: Study notes

2022/2023

Available from 06/19/2025

bhagyashree-pandian
bhagyashree-pandian 🇮🇳

1 document

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
VTU DBMS Module 5: Transaction Management and Concurrency Control (Detailed Notes)
1. Transactions
A transaction is a logical unit of database operations that must be executed completely or not at all.
Example of a Transaction:
1. Transfer 1000 from Account A to B
2. Debit A
3. Credit B
A transaction must maintain ACID properties:
2. ACID Properties
a. Atomicity
Ensures all operations of a transaction are completed. If not, the transaction is aborted.
Handled by undo mechanism.
b. Consistency
A transaction transforms the database from one consistent state to another.
c. Isolation
Ensures that the execution of one transaction is isolated from others.
Intermediate transaction results are invisible.
d. Durability
Once a transaction is committed, it remains so even after a system crash.
Handled by redo mechanism.
3. States of a Transaction
ActivePartially CommittedCommitted
OR → FailedAborted
4. Schedules
A schedule is a sequence of operations from multiple transactions.
Types:
pf3

Partial preview of the text

Download DBMS notes of module 5 is available. and more Study notes Database Management Systems (DBMS) in PDF only on Docsity!

VTU DBMS Module 5: Transaction Management and Concurrency Control (Detailed Notes)

1. Transactions

A transaction is a logical unit of database operations that must be executed completely or not at all. Example of a Transaction:

  1. Transfer ₹1000 from Account A to B
  2. Debit A
  3. Credit B A transaction must maintain ACID properties:

2. ACID Properties

a. Atomicity  Ensures all operations of a transaction are completed. If not, the transaction is aborted.  Handled by undo mechanism. b. Consistency  A transaction transforms the database from one consistent state to another. c. Isolation  Ensures that the execution of one transaction is isolated from others.  Intermediate transaction results are invisible. d. Durability  Once a transaction is committed, it remains so even after a system crash.  Handled by redo mechanism.

3. States of a Transaction

ActivePartially CommittedCommitted  OR → FailedAborted

4. Schedules

A schedule is a sequence of operations from multiple transactions. Types:

Serial Schedule : One transaction executes completely before another.  Concurrent Schedule : Interleaved operations of transactions. Conflict Serializability:  A schedule is conflict serializable if it can be transformed into a serial schedule by swapping non- conflicting operations.

5. Concurrency Control

Concurrency control ensures that database transactions are executed concurrently without violating data integrity. Problems in Concurrency:Lost Update : Two transactions overwrite each other’s changes.  Temporary Update (Dirty Read) : One transaction reads uncommitted data from another.  Incorrect Summary : Aggregate functions on inconsistent data.

6. Concurrency Control Techniques

a. Lock-Based ProtocolsShared Lock (S) : Read-only  Exclusive Lock (X) : Read & Write Two-Phase Locking Protocol (2PL):

  1. Growing Phase : Acquires all locks.
  2. Shrinking Phase : Releases locks.  Guarantees serializability b. Timestamp-Based Protocol  Assigns a timestamp to each transaction.  Ensures older transactions get priority.

7. Deadlock and Handling

Deadlock : A situation where two or more transactions wait for each other’s resources. Handling Techniques :  Deadlock Prevention : Resource ordering, wait-die & wound-wait schemes.