• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » Database » Advanced » How Recover from Database Failures.
Next →
← Prev

How Recover from Database Failures.

By Dinesh Thakur

In-order to recover the system after these failures we need to identify the failure modes of those devices used for storage of data. Next, we must consider how these failure modes affect the contents of the database. Then we can propose the recovery algorithms to recover the database. Every Recovery algorithm performs two types of actions. These are:

• Actions taken during normal transaction processing to ensure enough information exists to allow recovery from failure.

• Actions taken following a failure to recover the database to a state that is known to be correct.

We’ll be covering the following topics in this tutorial:

  • Terminology Used In Recovery Process
  • Work Area of a Transaction
  • Read (A, a)

Terminology Used In Recovery Process

Disk is partitioned into fixed length storage units called blocks. Blocks are the units of data transfer to and from disk and may contain several data. When a transaction starts the data required for the transaction is transferred from the disk to main memory (RAM) in\ blocks. When all the operations are performed on the block present in the main memory, then that block is transferred from main memory to disk for the final storage of results. The blocks residing on the disk one called as physical block. The block residing in temporarily on main memory is referred to as Buffer blocks. The area of memory where block reside temporarily is called as disk buffer as shown.

input operation

Block movements between disk and main memory are categorized in to following two operations:

• Input Operation: Transfer the physical block to main memory as shown.

• Output Operation: Transfer the buffer block in main memory to the disk and replaces the appropriate physical block as shown.output operation

Work Area of a Transaction

Each transaction Ti has a private work area in which copy of all the data items accessed and updated by Ti are kept. This work area is created when the transaction is initiated and is removed when transaction is completed or cancelled. Each data item X kept in work area of transaction is denoted by Xi.

Example:

Work Area of a Transaction

Read (A, a)

In order to perform above transaction first we find the data block in disk where A resides.

Suppose that data item A resides. in block X. Then system search for block X in main Memory (RAM). If block is not in main memory then system issue the inputs X command it means block X is copied from disk to main memory. After getting the value block X in main memory then the value of A is copied to temporary variable “a”. Now “a” has value 1000. All the above operations are covered under single read (A, a) operation.

                                                                     a=a-50

This subtraction is actually performed on local temporary variable “a”. Now it has value 950 as shown in figure.

Work Area of Transaction1

Write (A, a)

In order to perform above operation first system check that to which block data item A belongs. It is found that A belongs to block X then block X is searched in main memory. If block X is not in main memory then again input X operation is performed. After getting block X in main memory then content of temporary local variable “a” i.e. 950 is copied to database variable A”-Now database item A has value 950 in main memory. Since whole operation is performed in main memory the result of transaction A=950 are stored in main memory as shown in figure. Then in order to store the result in disk output operation is performed.

Output (X)

In case of output (X) block X residing in main memory overwritten in disk. It mean that now the value of data item A=950 is copied to disk permanently and the result of transaction is stored safely as shown in figure.

You’ll also like:

  1. How to Deadlock Detect and Recover.
  2. How to recover my Windows 7 existing system repair disc and backup image?
  3. What is Distributed Database? Characteristics of Distributed Database Management System.
  4. How we are Protecting the Data within the Database.
  5. What are the Causes for Database Failure?
Next →
← Prev
Like/Subscribe us for latest updates     

About Dinesh Thakur
Dinesh ThakurDinesh Thakur holds an B.C.A, MCDBA, MCSD certifications. Dinesh authors the hugely popular Computer Notes blog. Where he writes how-to guides around Computer fundamental , computer software, Computer programming, and web apps.

Dinesh Thakur is a Freelance Writer who helps different clients from all over the globe. Dinesh has written over 500+ blogs, 30+ eBooks, and 10000+ Posts for all types of clients.


For any type of query or something that you think is missing, please feel free to Contact us.


Primary Sidebar

DBMS

Database Management System

    • DBMS - Home
    • DBMS - Definition
    • DBMS - What is
    • DBMS - Entity Sets
    • DBMS - Components
    • DBMS - Languages
    • DBMS - Normalization
    • DBMS - Data Models
    • DBMS - Processing System
    • DBMS - Advantages
    • DBMS - ER-Model
    • DBMS - Functional Dependence
    • DBMS - Relational Model
    • DBMS - Architecture
    • DBMS - Network Model
    • DBMS - Approach
    • DBMS - Data Independence
    • DBMS - Relational Schema
    • DBMS - Instance
    • DBMS - Functions and Service
    • DBMS - Server
    • DBMS - DBA
    • DBMS - Instance & Schemas
    • DBMS - System Type
    • DBMS - DDL, DML and DCL
    • DBMS - Users
    • DBMS - Model
    • DBMS - System Structure
    • DBMS - Role of DBA
    • DBMS - Metadata
    • DBMS - ER-Diagram
    • DBMS - E-R Model Problems
    • DBMS - DBMS Vs.RDBMS
    • DBMS - Basic Construction of E-R
    • DBMS - E-R Notation
    • DBMS - Database View
    • DBMS - Concurrency Control
    • DBMS - Schema
    • DBMS - Procedure for Access
    • DBMS - Object
    • DBMS - dBase
    • DBMS - Relational Algebra
    • DBMS - Deadlock
    • DBMS - Relational Database
    • DBMS - Query
    • DBMS - Schema

DBMS Normal Forms

    • Database - CODD’S Rules
    • Database - 1NF
    • Database - 2NF
    • Database - 3NF
    • Database - 4NF
    • Database - 5NF
    • Database - BCNF

Advance Database

    • Database - File Organization
    • Database - Type Lock
    • Database - Transaction
    • Database - Key Type
    • Database - Relational Algebra
    • Database - Components
    • Database - Deadlock Detect
    • Database - Design Methodology
    • Database - Relational Operators
    • Database - Relational Calculus
    • Database - Lock Granularity
    • Database - Deadlocks Handling
    • Database - Concurrent Control
    • Database - Denormalization
    • Database - Starvation
    • Database - OODB
    • Database - Data Warehouse
    • Database - Fragmentation
    • Database - Data Replication
    • Database - Distributed
    • Database - Transparences
    • Database - ORDBMSS
    • Database - Data Mining
    • Database - Security
    • Database - DBTG
    • Database - OLAP
    • Database - Integrity
    • Database - Data Encryption
    • Database - Recover
    • Database - Data Protection

Some Other Advance Articls

  • Adv of Distributed DBMS
  • Homogeneous and Heterogeneous
  • Causes for Database Failure
  • DBMS Architecture
  • Features for Any DBMS
  • OLTP Systems Vs Data Warehousing
  • Data Warehousing Architecture

Other Links

  • DBMS - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2023. All Rights Reserved.