0% found this document useful (0 votes)
29 views20 pages

Transaction Control in DBMS Explained

This document discusses transaction control and concurrency in database management systems. It defines transactions as logically related operations that may include read, write, commit, and rollback operations. It describes the ACID properties of atomicity, consistency, isolation, and durability that transactions should satisfy. The document also lists several types of concurrency problems that can occur like dirty reads, lost updates, and phantom reads. It discusses using locks at the shared and exclusive levels to make schedules conflict serializable and avoid concurrency issues.

Uploaded by

kanika paliwal
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)
29 views20 pages

Transaction Control in DBMS Explained

This document discusses transaction control and concurrency in database management systems. It defines transactions as logically related operations that may include read, write, commit, and rollback operations. It describes the ACID properties of atomicity, consistency, isolation, and durability that transactions should satisfy. The document also lists several types of concurrency problems that can occur like dirty reads, lost updates, and phantom reads. It discusses using locks at the shared and exclusive levels to make schedules conflict serializable and avoid concurrency issues.

Uploaded by

kanika paliwal
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

Transaction Control &

Concurrency
DBMS Lec-6
Definition
• The transaction is a set of logically related operation. It contains a
group of tasks.
• Read(X): Read operation is used to read the value of X from the
database and stores it in a buffer in main memory.
• Write(X): Write operation is used to write the value back to the
database from the buffer.
• Commit: It is used to save the work done permanently.
• Rollback: It is used to undo the work done.
ACID Properties
• Atomicity (either all or none)
• Consistency (The total amount must be maintained before or after
the transaction)
• Isolation (In isolation, if the transaction T1 is being executed and
using the data item X, then that data item can't be accessed by any
other transaction T2 until the transaction T1 ends)
• Durability( It states that the transaction made the permanent
changes)
Types of problems in concurrency
• Dirty read
• Incorrect summary
• Lost update
• Unrepeatable read
• Phantom read
Dirty Read or Uncommited Read or RAW
Incorrect summary
Lost Update
Unrepeatable read
Phantom read
Irrecoverable
Recoverable
Conflict Serializable
• Conflict Serializable: A schedule is called conflict serializable if it can
be transformed into a serial schedule by swapping non-conflicting
operations.
Locks
• Shared Lock
• Exclusive lock

You might also like