LOCKING IN DBMS

Que. Explain  locking in DBMS?

Ans-


1) A lock is a one of the variable associated with a data item.

2) It is describes the status of the time with respect to possible operations that can be applied to it.


3) Its prevents access to a database record by a second transaction until the first transaction has completed all of its action.


 4) In database there is one lock for each data item in the database.


5) It is used to as means of synchronizing the access by concurrent transaction to the database items.


6) Locks are granted and released by a lock manager. The  data structure of lock manager is manage by lock table. 


7) Generally their are two types of lock:

a) S locks -Shared or Read lock
b) X locks-exclusive or Write lock.

8) Execution of the lock as a follows


a) Transaction T1 holds  an S lock on  data 'd' . A request by transaction T2 for  an S lock will be granted. Read-Read is allowed  .


b)Transaction T1 hold an S lock on data  'd'. A request by transaction T2 for  an S lock will be refused. Read-Write is not allowed.


c)Transaction T1 hold an X lock on data  'd'. A request by transaction T2  will be refused. Write is not allowed.


DBMS mainly uses the following types of locking techniques:

a) Binary locking

b) Exclusive locking
c) Shared locking
e) Three- phase locking(3PL)

SHARE

Milan Tomic

Hi. I’m Designer of Blog Magic. I’m CEO/Founder of ThemeXpose. I’m Creative Art Director, Web Designer, UI/UX Designer, Interaction Designer, Industrial Designer, Web Developer, Business Enthusiast, StartUp Enthusiast, Speaker, Writer and Photographer. Inspired to make things looks better.

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

0 comments:

Post a Comment

Important of Database privilages

Database privileges Privileges are the right or permission to execute particular SQL statements.                           System Se...