body>
Explore lock types, granularity levels, and advanced locking protocols through interactive simulations Experience different lock types, granularity levels, and locking protocols through real-time simulations. Entire database with all tables and data Complete table with all rows and columns Database page containing multiple rows Individual row with specific customer data Specific field within a row Transaction can acquire locks but cannot release any locks Transaction can release locks but cannot acquire new locks Explore the trade-offs between different lock granularity levels Database Level Locking: Select a prevention strategy above to see how it works in practice. Understanding different lock types and their applications in database systems Allow multiple transactions to read the same resource simultaneously Grant exclusive access to a single transaction for write operations Indicate intention to acquire locks at lower levels in the hierarchy Different levels of locking granularity offer various trade-offs: Different protocols ensure zsW and prevent deadlocks:
Lock granularity, 2-phase locking
Database Locking Mechanisms
Interactive Lock Mechanism simulator
Lock Granularity Hierarchy
Database: SalesDB
Table: Customers
Page: Page_001
Row: Customer_ID_1001
Field: Customer_Name
Lock Compatibility Matrix
Interactive Compatibility Testing
Lock Type
None
IS
IX
S
SIX
X
None
✓
✓
✓
✓
✓
✓
IS
✓
✓
✓
✓
✓
✗
IX
✓
✓
✓
✗
✗
✗
S
✓
✓
✗
✓
✗
✗
SIX
✓
✓
✗
✗
✗
✗
X
✓
✗
✗
✗
✗
✗
Lock Type Legend:
IX: Intention Exclusive
S: Shared
X: Exclusive
✓: Compatible ✗: Incompatible
Two-Phase Locking (2PL) Protocol
Interactive 2PL Demonstration
Growing Phase
Shrinking Phase
Transaction Timeline
Lock Queue Management
Real-time Lock Queue Simulation
Queue Management Controls
Lock Granularity Analysis
Interactive Granularity Testing
Current Selection: Database Level
Granularity Characteristics
Locking Performance Analysis
Lock Protocol Performance Comparison
throughput Analysis
Lock Contention metrics
Deadlock Prevention Strategies
Interactive Prevention Strategy Testing
Strategy Demonstration
Lock Status
Simulation Controls
Lock Types
Lock Activity Log
Waiting for lock operations...
Real-time metrics
Quick Actions
Database Lock Types & Mechanisms
Shared Locks (S)
Exclusive Locks (X)
Intention Locks
Lock Granularity Levels
Fine-Grained
Coarse-Grained
Locking Protocols