■ Cache – fastest and most costly form of storage; volatile; managed by the computer system hardware. Several levels of cache. ■ Main memory:
● fast access (10s to 100s of nanoseconds; 1 nanosecond = 10–9 seconds)
● generally too small (or too expensive) to store the entire database ! capacities of up to a few Gigabytes widely used currently ! Capacities have gone up and per-byte costs have decreased steadily and rapidly (roughly factor of 2 every 2 to 3 years)
● Volatile — contents of main memory are usually lost if a power failure or system crash occurs.
■ Flash memory
● Data survives power failure
● Data can be written at a location only once, but location can be erased and written to again ! Can support only a limited number (10K – 1M) of write/erase cycles. ! Erasing of memory has to be done to an entire bank of memory
● Reads are almost as fast as main memory (but not quite)
● But writes are slow (few microseconds), erase is slower
● Actual performance depends on file system and details
● Widely used in embedded devices such as digital cameras, phones, and USB keys
■ Magnetic-disk
● Data is stored on spinning disk, and read/written magnetically
● Primary medium for the long-term storage of data; typically stores entire database.
● Data must be moved from disk to main memory for access, and written back for storage ! Much slower access than main memory (more on this later)
● direct-access – possible to read data on disk in any order, unlike magnetic tape
● Capacities range up to roughly 1.5 TB as of 2009 ! Much larger capacity and cost/byte than main memory/flash memory ! Growing constantly and rapidly with technology improvements (factor of 2 to 3 every 2 years)
● Survives power failures and system crashes ! disk failure can destroy data, but is rare
Difference between magnetic disk and magnetic tape is that data can be read in any order from disk.
■ Optical storage
● Non-volatile, data is read optically from a spinning disk using a laser
● CD-ROM (640 MB) and DVD (4.7 to 17 GB) most popular forms
● Blu-ray disks: 27 GB to 54 GB
● Write-one, read-many (WORM) optical disks used for archival storage (CD-R, DVD-R, DVD+R)
● Multiple write versions also available (CD-RW, DVD-RW, DVD +RW, and DVD-RAM)
● Reads and writes are slower than with magnetic disk
● Juke-box systems, with large numbers of removable disks, a few drives, and a mechanism for automatic loading/unloading of disks available for storing large volumes of data