0% found this document useful (0 votes)
9 views4 pages

Information Management

Transactions in a DBMS are executed as single units that can change the database state, adhering to ACID properties: Atomicity, Consistency, Isolation, and Durability. Various transaction states include Active, Partially Committed, Committed, Failed, and Terminated, with recovery techniques such as log-based recovery and deferred/immediate updates. Concurrency control mechanisms manage simultaneous transactions to prevent interference, ensuring data integrity and system performance.

Uploaded by

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

Information Management

Transactions in a DBMS are executed as single units that can change the database state, adhering to ACID properties: Atomicity, Consistency, Isolation, and Durability. Various transaction states include Active, Partially Committed, Committed, Failed, and Terminated, with recovery techniques such as log-based recovery and deferred/immediate updates. Concurrency control mechanisms manage simultaneous transactions to prevent interference, ensuring data integrity and system performance.

Uploaded by

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

TRANSACTIONS

•A transaction is a program unit whose execution may or may not change the contents of a
database.

•The transaction concept in DBMS is executed as a single unit.

•If the database operations do not update the database but only retrieves data, this type of
transaction is called a read-only transaction.

•A successful transaction can change the database from one CONSISTENT STATE to another.

•DBMS transactions must be atomic, consistent, isolated and durable

•If the database were in an inconsistent state before a transaction, it would remain in the
inconsistent state after the transaction.

STATES OF TRANSACTIONS

ACTIVE STATE
A transaction enters into an active state when the execution process begins.

PARTIALLY COMMITTED
A transaction goes into the partially committed state after the end of a transaction.

COMMITTED
When the transaction is committed to state, it has already completed its execution successfully.

FAILED STATE
A transaction is considered failed when any one of the checks fails or if the transaction is
aborted while it is in the active state.

TERMINATED STATE
State of transaction reaches terminated state when certain transactions which are leaving the
system can't be restarted.

ACID Properties of Transaction:

1. Atomicity: All the operations in a transaction are considered to be atomic and as one unit.
Atomicity is maintained by the Transaction Management Component.

2. Consistency: Every transaction should lead to database connection from one valid state to
other valid state. Consistency is maintained by the Application manager.
3. Isolation: If multiple transactions are executing on a single database, each transaction should
be isolated from other transaction. Isolation is maintained by the concurrency control manager.

4. Durability: Durability means the changes made during the transactions should exist after
completion of transaction. It is maintained by the recovery manager.

FAILURE
A DBMS (Database Management System) is used to store, monitor, and manipulate data in a
fast and efficient manner. The durability of a system is marked by the ability to preserve the data
and changes made to the data.

A database may fail due to any of the following reasons:

•System failures are caused due to hardware or software problems in the system.

•Transaction failures occur when a particular process that deals with the modification of data
can't be completed.

•Disk crashes may be due to the inability of the system to read the disk.

•Physical damages includes problems like power failure or natural disaster.

RECOVERY

Log-based recovery is a technique used in database management systems (DBMS) to recover


lost or corrupted data. Log-based recovery works by replaying the changes recorded in the log
file since the last checkpoint.

CHECKPOINT is a point in time where the system ensures that all changes up to that point
have been recorded in the log file.

RECOVERY THROUGH DEFERRED UPDATE vs. IMMEDIATE UPDATE


(PAB, GAWIN MO YUNG TABLE SA PPT)
DEFERRED
•During a transaction, the changes are not applied immediately to the data.
•The log file holds the changes that are going to be applied.
•Buffering and Caching are used in this technique.
•More time is required to recover the data when a system failure occurs.
•If a rollback is made, the log files are destroyed and no change is made to the database.
IMMEDIATE
An immediate change is made in the database as soon as the transaction occurs.

The log file holds the changes along with the new and old values.

Shadow paging is used in this technique.

A large number of I/O operations are performed to manage the logs during the transaction.

If a rollback is made, the old state of the data is restored with the records in the log file.

CONCURRENCY CONTROL

Concurrency control is a technique used in database systems to manage shared resources by


multiple users or processes at the same time.
Concurrency control mechanisms ensure that multiple transactions executing simultaneously do
not interfere with each other's operations.

CONCURRENCY CONTROL MECHANISMS

Lock-based concurrency control involves acquiring locks on data objects to prevent other
transactions from accessing or modifying them.
Timestamp based protocol uses time stamp to serialize the execution of current transactions.
Isolation-based concurrency control, on the other hand, uses techniques such as snapshot
isolation and serializability to ensure that the outcome of concurrency transactions is equivalent
to that of a serial execution.
Not managing concurrent access may create issues like:

•Hardware failure and system crashes

•Concurrent execution of the same transaction, deadlock, or slow performance

Interaction of transaction management with storage, especially buffering

In a DBMS, the interaction between transaction management and storage buffering is critical.
The system must ensure that changes made to the database during a transaction are recorded
in the transaction log before they are written to a disk. This ensures that the system can recover
the database to a consistent state in case of failure.

DATABASE BUFFER is a portion of the computer's memory that temporarily stores data while
it is being moved between different locations.
THE BUFFER MANAGER in the DBMS is responsible for managing this process, including
allocating space for the buffer and data blocks, writing the data back to the disk, and removing
the data blocks from the buffer once they are no longer needed.

TRANSACTION MANAGEMENT
This typically involves maintaining a transaction log, which records all changes made to the
database during a transaction.
STORAGE BUFFERING
This involves using memory to cache frequently accessed data blocks to improve performance.

You might also like