Chapter 16 Disk Storage, Basic File Structures, Hashing, and Modern Storage Architectures
Databases are stored physically as files of records, which are typically stored on magnetic disks. Computer storage media form a storage hierarchy that includes three main categories:
- Primary storage: This category includes main memory and cache memory. It usually provides fast access to data, but is of limited storage capacity. They are still more expensive and have less storage capacity than demanded by typical enterprise-level databases.
- Secondary storage: The primary choice of storage medium for disk storage. It has a larger storage capacity and lower cost, but it is slower.
- Tertiary storage: Optical disks and tapes are removable media used in today’s systems as offline storage for archiving databases.
Secondary Storage Devices
Most databases are stored on disks:
- Generally, databases are too large to fit entirely in main memory.
- Disks provide a non-volatile storage — whereas main memory is often called volatile storage.
- It also cost less for disk secondary storage than for primary storage.
There are two main types of disk drives:
- Electrical: Solid state drive (SSD).
- Mechanical: Hard disk drive (HDD).
SSDs are faster, more durable, more compact, quieter, and consume less energy. However, HDDs are more affordable and may offer easier data recovery in the event of damage.
Hard Disk Drive
As denoted in the name, disks are made up of thin circular-shaped magnetic material, as shown below:

Figure 16.1 A single-sided disk and disk pack with read/write hardware.
In Figure 16.1: