Pessimistic Locking

Pessimistic Locking prevents any other application or user from fetching or updating the same record at the same time. Pessimistic locking can be a very powerful mechanism, but often databases can impose limitations. Some databases, such as Oracle, lock a single record; others (for example, Sybase) lock a page or group of records; still others, including Microsoft Access, do not support pessimistic locking at all. You should check your database documentation to see how its pessimistic-locking system works, or if it has one at all. Also different database lock objects differently. Some databases, such as Oracle, prevent anyone else from fetching an object while others, such as Sybase, raise an exception when an attempt is made to update a record that has already been locked and updated.

--ArnoldHesnod


Also see OptimisticLocking


EditText of this page (last edited January 10, 2004) or FindPage with title or text search