Content deleted Content added
fix list formatting with HTML |
m Date/fix maintenance tags |
||
Line 1:
{{Unreferenced|date=February 2007}}
In [[computer science]], in the field of [[database]]s, '''optimistic concurrency control''', (OCC) is a [[concurrency control]] method used in [[relational database]]s without using [[Lock (computer science)|lock]]ing. It is commonly referred to as '''optimistic locking''', a misnomer.
Line 17:
</ol>
When conflicts are rare, validation can be done efficiently, leading to higher throughput than other concurrency control methods.{{
==Web usage==
The [[Stateless server|stateless]] nature of [[HTTP]] makes locking infeasible for web user interfaces.{{
OCC is a natural choice. It is simple to implement and avoids unnecessary waiting or silently overwritten records. Typically the [[Form (web)|form]] presented to the user includes a hidden field with the record's original content, a timestamp, a sequence number, or an opaque token. On submit, this is compared against the database. If it differs, the conflict resolution algorithm is invoked.
|