Design of Main Memory Database System/Storage Engine Overview
Table of Contents — Previous: Storage Engine — Next: Database Management
Chapter 4: Storage Engine Overview
Storage engine usually takes care of data organization, access methods and transactions in Database Management Systems (DBMS). This is the lowest subsystem in DBMS that interacts with operating system services. Generally, products interact through OS Layer subsystem (wrapper to OS system calls) to ease the porting effort.
Data shall be stored in one of the following components of the computer system
- Memory
- Secondary Storage - Disk
- Tertiary storage - Tape
These components have data capacities, cost per byte, speed ranging over many orders of magnitude. Devices with smallest capacity offer the fastest access speed and have the highest cost per byte.
Current Trend:Tertiary storage are now replaced by disks because of its huge capacity and low cost per byte. Future Trend: Disks are replaced by main memory because of its increase in capacity and decrease in cost per byte.
One disk block transfer takes approximately 5 milliseconds whereas main memory access takes 100 nanoseconds. By keeping the whole database in memory, these disk I/Os are converted to memory access, thereby improves the throughput by many-folds. Memory being a volatile devices losses the data stored in it, when the power goes off. But disk being a non-volatile device keeps the content intact even for long periods when there is a power failure. This makes main memory storage manager difficult to implement. It uses logging and checkpointing mechanisms to cope up with power failure and make the data stored in main memory persistant.
Table of Contents — Previous: Storage Engine — Next: Database Management