请输入您要查询的百科知识:

 

词条 Rollback (data management)
释义

  1. Cascading rollback

  2. SQL

  3. See also

  4. References

{{Other uses|Rollback (disambiguation)}}{{Selfref|For the Wikipedia tool, see Rollback feature.}}{{no footnotes|date=June 2009}}

In database technologies, a rollback is an operation which returns the database to some previous state. Rollbacks are important for database integrity, 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.

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

Cascading rollback

A cascading rollback 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 rollbacked due to T1's failure, thus causing a cascading effect. That is, one transaction's failure causes many to fail.

Practical database recovery techniques guarantee cascadeless rollback, therefore a cascading rollback is not a desirable result.

SQL

SQL refers to Structured Query Language,a kind of language used to access,update and manipulate database.

In SQL, 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 systems (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 savepoints that may be in use.

In most SQL 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.

See also

  • Savepoint
  • Commit
  • Undo
  • Schema migration

References

  • {{cite book |author = Ramez Elmasri |title= Fundamentals of Database Systems |publisher= Pearson Addison Wesley |year= 2007|isbn= 0-321-36957-2 }}
  • "ROLLBACK Transaction", Microsoft SQL Server.
  • "Sql Commands", MySQL.
{{Databases}}{{Web syndication}}{{compu-prog-stub}}

3 : Database theory|Transaction processing|Reversible computing

随便看

 

开放百科全书收录14589846条英语、德语、日语等多语种百科知识,基本涵盖了大多数领域的百科知识,是一部内容自由、开放的电子版国际百科全书。

 

Copyright © 2023 OENC.NET All Rights Reserved
京ICP备2021023879号 更新时间:2024/11/10 18:48:18