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
do you know what is a deadlock and what is a live lock? How will you go about resolving deadlocks? : Sql server database administration
How we can refresh the view?
What is after dml trigger?
what is a default tcp/ip socket assigned for sql server? : Sql server database administration
What is partition in sql server?
I have a table Events Events containing cardno,time,id,name--each id has a cardno my requirement is every day each employee swipe the card several times i want to calculate first and last time of each card the output should be name 1 2 6 7 in out in out holiday holiday xxx 09:30 06:30 09:40 06:45 where 1,2...... are dates for example january 1,2, etc. 6 and 7 are saturday and sunday how it is posssible
Detail about query optimizer?
Define constraints and give an example of their use?
What is the usage of sign function?
What is a transact-sql statement?
What is the size of transaction log file?
Explain what is raid and what are different types of raid levels?
What different steps will a sql server developer take to secure sql server?
Can two different columns be merged into single column? Show practically?
What is right outer join in sql server joins?