Checkpoints in DBMS (original) (raw)

Last Updated : 13 Aug, 2025

A checkpoint marks a point in time where the DBMS ensures that the database is in a consistent state and all prior transactions have been committed. During transaction execution, these checkpoints are recorded periodically.

After a checkpoint is reached:

In a real-time system, transaction logs keep growing as updates happen, which can take up a lot of storage. This makes them hard to manage over time.

**Checkpoints help solve this by saving the current state of the database to permanent storage and clearing old logs. This keeps the log size small and improves system performance.

Steps to Use Checkpoints in the Database

The behavior when the system crashes and recovers when concurrent transactions are executed is shown below:

Checkpoints in multiple Transactions

Understanding Checkpoints in multiple Transactions

Transactions and operations of the above diagram:

**Transaction 1 (T1) **Transaction 2 (T2) **Transaction 3 (T3) **Transaction 4 (T4)
START
START
COMMIT
START
COMMIT
START
FAILURE

**Recovery Rule Summary

Transaction Analysis

**T1:

**T2:

**T3:

**T4:

Final undo and redo list :

All the transactions in the redo list are deleted with their previous logs and then redone before saving their logs. All the transactions in the undo list are undone and their logs are deleted.

Types of Checkpoints

There are basically two main types of Checkpoints:

**Automatic Checkpoint

**Manual Checkpoint

Relevance of Checkpoints

A checkpoint is a crucial feature that contributes to the Consistency (C) in the ACID properties of a relational database management system (RDBMS). It plays a vital role in database recovery, especially in the event of an unexpected shutdown or crash.

Checkpoints occur at regular intervals and perform the following actions:

In systems like SQL Server, checkpoints run automatically at defined intervals and are managed as a dedicated background process.

Real-Time Applications of Checkpoints

Checkpoints play a vital role in database systems and offer several real-time applications, especially in the areas of backup and recovery, performance optimization, and auditing.

**1. Checkpoint and Recovery: In the event of a system failure, the DBMS refers to the last checkpoint to recover the database to its last known consistent state.

**2. Importance of Checkpoints in Performance Optimization: They reduce the amount of recovery work required by discarding unnecessary or already committed transaction data.

**3. Checkpoints and Auditing

Advantages of Checkpoints

For more information you can refer to Transaction Management article.