Concurrent Database Access

In many organizations, concurrent database access is common, so it is important to prevent data from being modified so that it will adversely affect other users. To prevent external data modification, two record-level locking methods can be applied to individual records: optimistic and pessimistic concurrency.

Pessimistic concurrency uses the method of applying a lock directly to the row being modified. This requires a “lock” column to exist in the table, which is set when a user fetches data for modification. If another user tries to modify the same row, the lock denies the request until the initial user clears the lock. This method of locking rows is typically used in environments where there is a high potential ...

Get Special Edition Using® Microsoft® ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.