Disk-based storage is used in database servers to persist data because it can survive downtimes like power outages and has a lower cost per megabyte than RAM. However, disks are slower than RAM, so database servers use RAM as a data cache. When data is first requested, it is read from disk into RAM. Subsequent requests for the same data are faster because the data is already cached in RAM. When the RAM cache fills, older data is removed to make space for new data being loaded from disk into RAM.