Types of Checkpoints
There are basically two main types of Checkpoints:
- Automatic Checkpoint
- Manual Checkpoint
1. Automatic Checkpoint: These checkpoints occur very frequently like every hour or every day. These intervals are set by the database administrator. They are generally used by heavy databases as they are frequently updated, and we can recover the data easily in case of failure.
2. Manual Checkpoint: These are the checkpoints that are manually set by the database administrator. Manual checkpoints are generally used for smaller databases. They are updated very less frequently only when they are set by the database administrator.
Checkpoints in DBMS
Pre-Requisite: Transaction Management
The Checkpoint is used to declare a point before which the DBMS was in a consistent state, and all transactions were committed. During transaction execution, such checkpoints are traced. After execution, transaction log files will be created. Upon reaching the savepoint/checkpoint, the log file is destroyed by saving its update to the database. Then a new log is created with upcoming execution operations of the transaction and it will be updated until the next checkpoint and the process continues.