Skip to content
Related Articles
Open in App
Not now

Related Articles

Why recovery is needed in DBMS

Improve Article
Save Article
  • Difficulty Level : Basic
  • Last Updated : 28 Nov, 2022
Improve Article
Save Article

Basically, whenever a transaction is submitted to a DBMS for execution, the operating system is responsible for making sure or to be confirmed that all the operations which need to be performed in the transaction have been completed successfully and their effect is either recorded in the database or the transaction doesn’t affect the database or any other transactions. 

The DBMS must not permit some operation of the transaction T to be applied to the database while other operations of T are not. This basically may happen if a transaction fails after executing some of its operations but before executing all of them. 

Types of failures – 
There are basically the following types of failures that may occur and leads to the failure of the transaction such as:

  1. Transaction failure
  2. System failure
  3. Media failure and so on.

Let us try to understand the different types of failures that may occur during the transaction.

  1. System crash – 
    A hardware, software, or network error occurs comes under this category this type of failure basically occurs during the execution of the transaction. Hardware failures are basically considered Hardware failures.
  2. System error – 
    Some operation that is performed during the transaction is the reason for this type of error to occur, such as integer or divide by zero. This type of failure is also known as the transaction which may also occur because of erroneous parameter values or because of a logical programming error. In addition to this user may also interrupt the execution during execution which may lead to failure in the transaction.
  3. Local error – 
    This basically happens when we are doing the transaction but certain conditions may occur that may lead to the cancellation of the transaction. This type of error is basically coming under Local error. A simple example of this is that data for the transaction may not be found. When we want to debit money from an insufficient balance account it leads to the cancellation of our request or transaction. And this exception should be programmed in the transaction itself so that it wouldn’t be considered as a failure.
  4. Concurrency control enforcement – 
    The concurrency control method may decide to abort the transaction, to start again because it basically violates serializability or we can say that several processes are in a deadlock.
  5. Disk failure – 
    This type of failure basically occurs when some disk loses its data because of a read or write malfunction or because of a disk read/write head crash. This may happen during a read /write operation of the transaction.
  6. Catastrophe- 
    These are also known as physical problems it basically refers to the endless list of problems that include power failure or air-conditioning failure, fire, theft sabotage overwriting disk or tapes by mistake, and mounting of the wrong tape by the operator.
My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!