Welcome to WebmasterServe!

FREE TO JOIN! Join us now to engage in informative and friendly discussions about Webmastering, SEO, SEM, Internet Marketing, Programming, Graphic Design, Online Jobs and more. What are you waiting for? Ready to join our friendly community? It takes just one minute to register.

Dismiss Notice

Join WebmasterServe Forums 
Join the discussion! Have a better idea or an opinion? It takes just one minute to register Click Here to Join

My Suggestion Database Locks

Discussion in 'Database Management' started by justiinn, Feb 20, 2016.

  1. justiinn

    Yellow Belt

    Joined:
    Feb 3, 2016
    Messages:
    161
    Ratings:
    +28 / -0
    A lock is a variable which is link with the data that shows the status of the data with respect to operations performed on it.
    changing or manipulating the lock's value is known as locking.
    there are two types of lock-
    1. exclusive lock
    this is called as write lock.this is used to provide use of data item to transaction.
    2. shared lock
    this is called as read lock. this is used to ensure that data item does not have any changes.
     
  2. steve taylor

    Yellow Belt

    Joined:
    Feb 12, 2016
    Messages:
    769
    Ratings:
    +25 / -0
    Lock are applied on the share data to prevent inconsistency due to concurrent read and write operation performed on the share data.
    There are normally two types of locks are acquired by the concurrency controller on the shared data.

    Shared lock:-
    • Shared locks are also known as read lock. It acquire on the data when transaction request for read operation.
    Exclusive lock :-
    • Exclusive locks are acquire on the shared data when transaction request for read and write the data.
     
  3. VIVEK KUMAR

    Yellow Belt

    Joined:
    Mar 8, 2016
    Messages:
    300
    Ratings:
    +2 / -0
    Locks are used in the database to prevent inconsistency in the data base. Suppose There are a single file which is shared by two people one is reading the content of the file and another one is perform the update operation on that file. so first user can get different value each time when they read the content of the file. To prevent these situation there are locks are applied to the shared file to achieve consistency.
     

Share This Page