databaserollback
Databaserollback refers to the process by which a database reverts to a previous consistent state by undoing the effects of one or more uncommitted transactions. It is a core mechanism for preserving atomicity in the ACID properties of many relational and some non-relational databases. Rollback is typically triggered explicitly by a ROLLBACK statement or implicitly when a transaction fails due to constraint violations, deadlocks, or system errors.
Implementation relies on logging: write-ahead logs or undo logs record a transaction's changes before they are
The scope of a rollback is usually limited to the currently active transaction. Savepoints allow partial rollback
Crash recovery combines undo and redo to bring the database to a consistent state, applying committed changes