What are the two types of concurrency?

Answers were Sorted based on User's Feedback



What are the two types of concurrency?..

Answer / s.vanitha

Pessimistic concurrency control
Optimistic concurrency control

Is This Answer Correct ?    4 Yes 1 No

What are the two types of concurrency?..

Answer / 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

What are the two types of concurrency?..

Answer / priyanka

there are basically two types of concurracnies...
1-> logical concurrency
2-> physical concurrency

Is This Answer Correct ?    0 Yes 0 No

What are the two types of concurrency?..

Answer / nomaan khan

Concurrency occur when more than one Task want to perform
at same time, so as per my knowledge it will be of two type
1. Concurrent read
2. Concurrent Write
In this concurrent Read permission will be grant by
Admin but Concurrent write permission will not grant by the
Admin because it will give us a Fantom Problem.

Is This Answer Correct ?    0 Yes 3 No

Post New Answer

More SQL Server Interview Questions

Help!!!!!!!!!!!! My database has gone offline, it is highlighted as 'Suspect'. Foolishly, i haven't got a recent back up. Is there a way of quickly restoring the database? Thank you

0 Answers  


Hi, I have a table A which has four rows as follows Table A ------- empname salary ------- ------ A 1000 B 2000 C 3000 A 1000 B 2000 D 5000 I need the following output: empname salary ------- ------ A 1000 A 1000 B 2000 B 2000 Thanks in advance

10 Answers   IBM,


Which operator do you use to return all of the rows from one query except rows are returned in a second query?

0 Answers  


Why should one not prefix user stored procedures with ‘sp_’?

0 Answers  


How secure is sql server database?

0 Answers  






You notice that the transaction log on one of your databases is over 4gb the size of the data file is 2mb what could cause this situation, and how can you fix it?

0 Answers  


what is a join and explain different types of joins? : Sql server database administration

0 Answers  


What are different types of raid configurations? : SQL Server Architecture

0 Answers  


After creating the cube, if we added a new column to the oltp table then how you add this new attribute to the cube? : sql server analysis services, ssas

0 Answers  


How to delete an existing row with delete statements in ms sql server?

0 Answers  


What is the difference between a Application Server and a Database

3 Answers   Oracle,


What is not null constraint?

0 Answers  


Categories