Database Locking March 19, 2007
Posted by nhabibi in Computer-Science Term, Database.add a comment
One of the most important feature of a DBMS, is its ability to support concurrent transactions and keep the DB safe against inconsistency,by means of database locking:
When many people may be reading the same data item at the same time, it is usually necessary to ensure that only one application at a time can change a data item. Locking is a way to do this. Because of locking, all changes to a particular data item will be made in the correct order in a transaction.
Different DBMS have different locking mechanisms, but lots in common.
The problems of running concurrent are grouped in to 3: Dirty Read – Non Repeatable Read – Phantom Reads
Isolation levels represent DBMS capability to prevent above problems. The higher level, the more complicated mechanism.
4 levels are considered: Read Uncommitted – Read Committed -
Repeatable Read – Serializable
More info here.
You can see a short report, in Persian, here. We introduced the locking in Sql Server, Oracle and Microsoft Access, briefly.