Storage Engine Features

Access Methods

B+ Tree Implementation

  • Multi-level tree structure for efficient range queries
  • Support for internal and leaf pages
  • Automatic page merging for empty nodes
  • Overflow page support for large records

LSM Tree Implementation

  • Write-optimized LSM tree backend
  • Level-based compaction strategy
  • Efficient range queries

Buffer Pool Manager

  • Configurable buffer pool with page caching
  • Replacement policies (LRU, Clock)
  • Disk manager with persistent storage

Page Layout

  • Size: System-dependent
  • Byte Order: Little Endian (LSB)
  • Format: Slotted pages for variable-size records
  • Sorting: Logical sorting support
  • Version Control: Magic numbers for file format versioning
  • Right-Most Neighbor: Stored in page header for linked access

Transaction Support

  • MVCC: Multi-Version Concurrency Control
  • OCC: Optimistic Concurrency Control
  • 2PL: Two-Phase Locking
  • WAL: Write-Ahead Logging for durability
  • Rollback: Comprehensive undo/rollback operations

Concurrency Control

  • Clock replacement policy in buffer pool
  • LRU replacement alternative
  • Transaction isolation managers
  • Deadlock detection via wait-for graphs