Answer Posted / afan
When many people attempt to modify data in a database at
the same time, a system of controls must be implemented so
that modifications made by one person do not adversely
affect those of another person. This is called concurrency
control.
Concurrency control theory has two classifications for the
methods of instituting concurrency control:
Pessimistic concurrency control
A system of locks prevents users from modifying data in a
way that affects other users. After a user performs an
action that causes a lock to be applied, other users cannot
perform actions that would conflict with the lock until the
owner releases it. This is called pessimistic control
because it is mainly used in environments where there is
high contention for data, where the cost of protecting data
with locks is less than the cost of rolling back
transactions if concurrency conflicts occur.
Optimistic concurrency control
In optimistic concurrency control, users do not lock data
when they read it. When a user updates data, the system
checks to see if another user changed the data after it was
read. If another user updated the data, an error is raised.
Typically, the user receiving the error rolls back the
transaction and starts over. This is called optimistic
because it is mainly used in environments where there is
low contention for data, and where the cost of occasionally
rolling back a transaction is lower than the cost of
locking data when read.
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Explain the functionalities that views support?
What is statement level trigger?
What is the difference between web edition and business edition?
How do I setup a sql server database?
What are differences in between sql server 2012 and sql server 2016?
what is the different types of backups available in sql server? : Sql server database administration
what is memory-optimized nonclustered indexes
Can a rule be bound to any column of any data type?
what changed between the previous version of sql server and the current version? : Sql server database administration
How to convert numeric expression data types using the cast() function?
Where cross join is used?
List the different types of joins?
What is mean by candidate key?
How to find out what is the default collation in a database?
What is the contrast amongst drop and truncate?