- Two main types of locks can be requested:
- Shared lock: Read lock i.e. Any other TX can read but not write
- Exclusive lock: Write lock i.e. No other TX can read or write
- Two Phase Locking (2PL) is a concurrency control method that guarantees serializability.
- A Growing/Expanding/First Phase: locks are acquired and no locks are released.
- A Shrinking/Contracting/Second Phase: locks are released and no locks are acquired.