All Topics  
Rollback (data management)

 

   Email Print
   Bookmark   Link






 

Rollback (data management)



 
 
In database
Database

A database is a structured collection of records or data that is stored in a computer system. The structure is achieved by organizing the data according to a database model....
 technologies, a rollback is an operation which returns the database to some previous state. Rollbacks are important for database integrity
Data integrity

Data integrity is a term used in computer science and telecommunications that can mean ensuring data is "whole" or complete, the condition in which data are identically maintained during any operation , the preservation of data for their intended use, or, relative to specified operations, the a priori expectation of data quality....
, because they mean that the database can be restored to a clean copy even after erroneous operations are performed. They are crucial for recovering from database server crashes; by rolling back any transaction which was active at the time of the crash, the database is restored to a consistent state.

In SQL
SQL

SQL is a database computer language designed for the retrieval and management of data in relational database management systems , database schema creation and modification, and database object access control management....
, ROLLBACK is a command that causes all data changes since the last BEGIN WORK, or START TRANSACTION to be discarded by the relational database management system
Relational database management system

A Relational database management system is a database management system that is based on the relational model as introduced by E. F. Codd. Most popular commercial and open source databases currently in use are based on the relational model....
 (RDBMS), so that the state of the data is "rolled back" to the way it was before those changes were made.

A ROLLBACK statement will also release any existing savepoint
Savepoint

A savepoint is a way of implementing subtransactions within a relational database management system by indicating a point within a database transaction that can be "rolled back to" without affecting any work done in the transaction before the savepoint was created....
s that may be in use.

In most SQL
SQL

SQL is a database computer language designed for the retrieval and management of data in relational database management systems , database schema creation and modification, and database object access control management....
 dialects, ROLLBACKs are connection specific.






Discussion
Ask a question about 'Rollback (data management)'
Start a new discussion about 'Rollback (data management)'
Answer questions from other users
Full Discussion Forum



Encyclopedia


In database
Database

A database is a structured collection of records or data that is stored in a computer system. The structure is achieved by organizing the data according to a database model....
 technologies, a rollback is an operation which returns the database to some previous state. Rollbacks are important for database integrity
Data integrity

Data integrity is a term used in computer science and telecommunications that can mean ensuring data is "whole" or complete, the condition in which data are identically maintained during any operation , the preservation of data for their intended use, or, relative to specified operations, the a priori expectation of data quality....
, because they mean that the database can be restored to a clean copy even after erroneous operations are performed. They are crucial for recovering from database server crashes; by rolling back any transaction which was active at the time of the crash, the database is restored to a consistent state.

In SQL
SQL

SQL is a database computer language designed for the retrieval and management of data in relational database management systems , database schema creation and modification, and database object access control management....
, ROLLBACK is a command that causes all data changes since the last BEGIN WORK, or START TRANSACTION to be discarded by the relational database management system
Relational database management system

A Relational database management system is a database management system that is based on the relational model as introduced by E. F. Codd. Most popular commercial and open source databases currently in use are based on the relational model....
 (RDBMS), so that the state of the data is "rolled back" to the way it was before those changes were made.

A ROLLBACK statement will also release any existing savepoint
Savepoint

A savepoint is a way of implementing subtransactions within a relational database management system by indicating a point within a database transaction that can be "rolled back to" without affecting any work done in the transaction before the savepoint was created....
s that may be in use.

In most SQL
SQL

SQL is a database computer language designed for the retrieval and management of data in relational database management systems , database schema creation and modification, and database object access control management....
 dialects, ROLLBACKs are connection specific. This means that if two connections are made to the same database, a ROLLBACK made in one connection will not affect any other connections. This is vital for proper concurrency.

The rollback feature is usually implemented with a transaction log, but can also be implemented via multiversion concurrency control
Multiversion concurrency control

Multiversion concurrency control , in the database field of computer science, is a concurrency control method commonly used by database management systems to provide concurrent access to the database....
.

A cascading rollback
Cascading rollback

A cascading rollback occurs in database systems when a Database transaction causes a failure and a Rollback must be performed. Other transactions dependent on T1's actions must also be rolled back due to T1's failure, thus causing a cascading effect....
 occurs in database systems when a transaction (T1) causes a failure and a rollback must be performed. Other transactions dependent on T1's actions must also be rolled back due to T1's failure, thus causing a cascading effect.

See also

  • Savepoint
    Savepoint

    A savepoint is a way of implementing subtransactions within a relational database management system by indicating a point within a database transaction that can be "rolled back to" without affecting any work done in the transaction before the savepoint was created....
  • Commit
    Commit (data management)

    In the context of computer science and data management, commit refers to the idea of making a set of tentative changes permanent. A popular usage is at the end of a database transaction....