Method and apparatus for optimistic locking using SQL select, update, delete, and insert statements
Abstract
A method, computer program product and data processing system for optimistic locking. An integer column is added to a database table. A Structured Query Language statement is constructed and prepared to form a prepared Structured Query Language statement, wherein a result set of the prepared Structured Query Language statement includes the integer column. Any required parameter information is set in the prepared Structured Query Language statement. The prepared Structured Query Language statement is executed in a database transaction. A unique key associated with an element of the result set of the prepared Structured Query Language statement is determined. The row of the database table that the unique key is associated with is determined. A value in the integer column of the determined row is determined. The value in the integer column of the determined row is stored to form a stored value associated with the unique key, wherein the stored value ceases to exist when the database transaction ends.
Interactive Citation Constellation Global Citation Ranking
Interactive SVG Citation Constellation renders in Rust/WebAssembly. Prior art cited: 30 · Forward citations: 4.
Claims (2 — 2 Independent, 0 Dependent)
- Claim 1Independent Claim
A computer implemented method for providing optimistic locking in a database containing a plurality of data records, comprising: providing a variable optimistic locking value for each data record; deleting a data record identified by a first key during a database transaction; storing a current value of the optimistic locking value of the deleted data record during the database transaction; during the same database transaction, inserting a data record identified by a second key; when the second key is the same as the first key, setting the optimistic locking value for the inserted record to the
- Claim 2Independent Claim
The method of
Technical Overview & Description
Full multi-page specification text is archived at the issuing office. Read complete official specification ↗
Cited By — Indexed Forward Citations (4 of 4 total)
References Cited — Backward Prior Art (30)
Non-Patent Literature (5)
- Sunderraman, "Oracle Programming: A Primer", Addison-Wesley, Reading, Massachusetts, Oct. 1998, 8 pages.
- USPTO Final Office Action dated Aug. 27, 2008 for U.S. Appl. No. 11/340,995.
- USPTO Final Office Action dated Aug. 3, 2009 for U.S. Appl. No. 11/340,995.
- USPTO Notice of Allowance dated Dec. 4, 1999 for U.S. Appl. No. 11/340,995.
- USPTO Office Action dated Feb. 13, 2009 for U.S. Appl. No. 11/340,995.