23.10.2012 Views

Structured Query Language (SQL) - Cultural View of Technology

Structured Query Language (SQL) - Cultural View of Technology

Structured Query Language (SQL) - Cultural View of Technology

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Commit (data management) 21<br />

Commit (data management)<br />

In the context <strong>of</strong> computer science and data management, commit refers to the idea <strong>of</strong> making a set <strong>of</strong> tentative<br />

changes permanent. A popular usage is at the end <strong>of</strong> a transaction. A commit is the act <strong>of</strong> committing.<br />

Data management<br />

A COMMIT statement in <strong>SQL</strong> ends a transaction within a relational database management system (RDBMS) and<br />

makes all changes visible to other users. The general format is to issue a BEGIN WORK statement, one or more<br />

<strong>SQL</strong> statements, and then the COMMIT statement. Alternatively, a ROLLBACK statement can be issued, which<br />

undoes all the work performed since BEGIN WORK was issued. A COMMIT statement will also release any<br />

existing savepoints that may be in use.<br />

In terms <strong>of</strong> transactions, the opposite <strong>of</strong> commit is to discard the tentative changes <strong>of</strong> a transaction, a rollback.<br />

Revision control<br />

Commits are also done for revision control systems for source code such as Subversion or Concurrent Versions<br />

System. A commit in the context <strong>of</strong> these version control systems refers to submitting the latest changes <strong>of</strong> the<br />

source code to the repository, and making these changes part <strong>of</strong> the head revision <strong>of</strong> the repository. Thus, when other<br />

users do an UPDATE or a checkout from the repository, they will receive the latest committed version, unless they<br />

specify they wish to retrieve a previous version <strong>of</strong> the source code in the repository. Version control systems also<br />

have similar functionality to <strong>SQL</strong> databases in that they allow rolling back to previous versions easily. In this<br />

context, a commit with version control systems is not as dangerous as it allows easy rollback, even after the commit<br />

has been done.<br />

See also<br />

• Atomic commit<br />

• Two-phase commit protocol<br />

• Three-phase commit protocol

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!