Transaction Management in DBMS

Definition

Transaction is a collection of operations that form a single unit. Operations such as data insertion, updating, and deletion are referred to as transactions in DBMS. One or more database operations are needed for this collection of logical works. A transaction indicates that the database has changed.

For instance, the amount of money that remains in our account is updated in the bank's database whenever we take money out of it. This can be called a transaction in which we are updating or deleting data in a database by carrying out a logical series of actions. These sets of actions are carried out as one single entity.

When a computer restarts following a crash, transaction management in DBMS guarantees that data is consistently restored. Data recovery after a system crash depends on data restoration. Thus, transaction management entails documenting and managing transactions as well as carrying out the required rollback and recovery procedures.


Types of Transaction Management in DBMS 

 1. Atomicity

According to this principle, a transaction must be viewed as an atomic unit, meaning that either all of its activities are carried out or none at all. A database must never have a state where a transaction is left unfinished. States should be established either prior to the transaction's execution or following its completion, cancellation, or failure.


2. Consistency 

Any transaction must leave the database in a consistent state. No transaction ought to negatively impact the information stored in the database. The database must maintain its consistency after a transaction is executed if it was in a consistent state prior to the transaction.


3. Durability 

Even in the event of a system failure or restart, the database should be robust enough to retain all of its most recent updates. The database will store the updated data if a transaction commits to updating a portion of the data. The data will be updated when the system restarts if a transaction commits but the system malfunctions before the data can be written to the disk.


4. Isolation 

When multiple transactions are being carried out concurrently in a database system, the property of isolation states that each transaction will be carried out and processed as though it were the only one in the system. No transaction will have an impact on another transaction's existence.

Tags

Post a Comment

0 Comments
* Please Don't Spam Here. All the Comments are Reviewed by Admin.

Top Post Ad

Below Post Ad