Interactions with the disk for data storage
The storage layer is responsible for reading from and writing to the disk. Each node in a CockroachDB cluster should have at least one storage attachment. Data is stored as key-value pairs on the disk using a storage engine.
Storage engine
A database management system (DBMS) uses a storage engine to perform CRUD (which stands for create, read, update, and delete) operations on the disk. Usually, the storage engine acts as a black box, so you get more options to choose from based on your own requirements, and also, storage engines evolve independently of the DBMSes that are using them.
Storage engines use a variety of data structures to store data. The popular ones are listed here:
- Hash table
- B+ tree
- Heap
- Log-structured merge-tree (LSM-tree)
Storage engines also work with a wide range of storage types, including the following:
- Solid-state drive (SSD)
- Flash storage
- Hard disk
- Remote...