BeginnersBook

  • Home
  • Java
    • Java OOPs
    • Java Collections
    • Java Examples
  • C
    • C Examples
  • C++
    • C++ Examples
  • DBMS
  • Computer Network
  • Python
    • Python Examples
  • More…
    • jQuery
    • Kotlin
    • WordPress
    • SEO
    • JSON
    • JSP
    • JSTL
    • Servlet
    • MongoDB
    • XML
    • Perl

DBMS Transaction States

Last Updated: December 14, 2018 by Chaitanya Singh | Filed Under: DBMS

In this guide, we will discuss the states of a transaction in DBMS. A transaction in DBMS can be in one of the following states.

DBMS Transaction States Diagram

DBMS Transaction States

Lets discuss these states one by one.

Active State

As we have discussed in the DBMS transaction introduction that a transaction is a sequence of operations. If a transaction is in execution then it is said to be in active state. It doesn’t matter which step is in execution, until unless the transaction is executing, it remains in active state.

Failed State

If a transaction is executing and a failure occurs, either a hardware failure or a software failure then the transaction goes into failed state from the active state.

Partially Committed State

As we can see in the above diagram that a transaction goes into “partially committed” state from the active state when there are read and write operations present in the transaction.

A transaction contains number of read and write operations. Once the whole transaction is successfully executed, the transaction goes into partially committed state where we have all the read and write operations performed on the main memory (local memory) instead of the actual database.

The reason why we have this state is because a transaction can fail during execution so if we are making the changes in the actual database instead of local memory, database may be left in an inconsistent state in case of any failure. This state helps us to rollback the changes made to the database in case of a failure during execution.

Committed State

If a transaction completes the execution successfully then all the changes made in the local memory during partially committed state are permanently stored in the database. You can also see in the above diagram that a transaction goes from partially committed state to committed state when everything is successful.

Aborted State

As we have seen above, if a transaction fails during execution then the transaction goes into a failed state. The changes made into the local memory (or buffer) are rolled back to the previous consistent state and the transaction goes into aborted state from the failed state. Refer the diagram to see the interaction between failed and aborted state.

❮ PreviousNext ❯

Top Related Articles:

  1. Transaction Management in DBMS
  2. Cardinality in DBMS
  3. Types of DBMS (Database Management System)
  4. Failure Classification in DBMS
  5. Log-Based Recovery in DBMS

About the Author

I have 15 years of experience in the IT industry, working with renowned multinational corporations. Additionally, I have dedicated over a decade to teaching, allowing me to refine my skills in delivering information in a simple and easily understandable manner.

– Chaitanya

Comments

  1. Harsha Chowdary says

    April 21, 2020 at 10:18 AM

    I have a doubt in partially commited state you told that this state help us to rollback the changes made to the database in case of a failure during Execution,but actually the changes should be made to the data stored in main memory right,so that in case if any failure occurs ,it rollbacks(acquires) the previous value from the database

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

DBMS Tutorial

Basics

  • DBMS Tutorial
  • DBMS Introduction
  • Database Applications
  • DBMS vs File System
  • DBMS vs RDBMS
  • DBMS Architecture
  • Three-level DBMS architecture
  • View in DBMS
  • Abstraction
  • Instance & Schema
  • DBMS languages

Data Models

  • Data Models
  • ER Diagram
  • ER Design issues
  • Convert ER to table
  • DBMS Generalization
  • DBMS Specialization
  • DBMS Aggregration
  • Relational Model
  • Hierarchical Model
  • Constraints
  • Cardinality

Relational Database

  • RDBMS concepts
  • Relational Algebra
  • Relational Calculus
  • Keys Index
  • Primary Key
  • Super Key
  • Candidate Key
  • Foreign Key
  • Composite Key
  • Alternate Key

Normalization

  • Normalization
  • Functional dependency

Transaction Management

  • Transaction Management
  • ACID properties
  • Transaction States
  • DBMS Schedules
  • Serializability
  • Conflict Serializability
  • View Serializability
  • Recoverability Of Schedule
  • Failure Classification
  • Log based Recovery
  • DBMS Checkpoint
  • Deadlock

Concurrency Control

  • Concurrency Control
  • Lock based protocol
  • Timestamp based protocol
  • Validation based protocol

File Organization

  • File Organization
  • Sequential File Organization
  • Heap File Organization
  • Hash File Organization
  • DBMS ISAM
  • B+ File Organization
  • Cluster File Organization

SQL Introduction

  • SQL Introduction
  • SQL Characteristics
  • Advantages of SQL
  • SQL Commands
  • SQL Operators
  • SQL CREATE
  • SQL DROP
  • SQL SELECT
  • SQL INSERT

Copyright © 2012 – 2025 BeginnersBook . Privacy Policy . Sitemap