Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What are the two types of concurrency?

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


Please Help Members By Posting Answers For Below Questions

Why we use the openxml clause?

1012


Does partitioning improve performance?

979


When a primary key constraint is included in a table, what other constraints does this imply?

989


What is difference between aggregate and analytic function?

938


Define left outer join in sql server joins?

965


Are null values the same as that of zero or a blank space?

1040


What is the guest user account in sql server? What login is it mapped to it? : sql server security

1064


Can you please explain the difference between function and stored procedure?

1007


What are the properties of the relational tables?

881


Write query to return all rows sql?

1056


Which sql server table is used to hold the stored procedure script?

948


Why transaction is important?

975


If a stored procedure is taking a table data type, how it looks?

6449


Can we insert data if clustered index is disabled?

943


What are the differences between having and where clause.

966