Anonymous

What Is The Difference Between Exclusive Locks And Share Locks?

1

1 Answers

Qurrat ul ain Hassan Profile
What exactly a database is? A database is the huge collection of data that is stored into it in form of tables. This data is very important for the companies who use those databases as any loss or misuse of this data can put both the company and customers into trouble. In order to avoid this situation and protect the customers, database developing companies provide much security featured with their database products; one of them is Locking system to maintain the integrity of database. There are two types of lock available with database system, these are:

1) Shared Lock: is provided to the readers of the data. These locks enable all the users to read the concurrent data at the same time, but they are not allowed to change/ write the data or obtain exclusive lock on the object. It could be set for table or table row. Lock is released or unlocked at the end of transaction.

2) Exclusive Lock: is provided to the writers of the data. When this lock is set on a object or transaction, it means that only writer, who has set the lock can change the data, and if other users cannot access the locked object. Lock is released at the end of change in transaction. Can be set on Tables or rows.

Answer Question

Anonymous