110
6. Storage and File Structures
Goals
Understand the basic concepts underlying different storage media, buffer management, files structures, and organization of records in files.
Contents
•
•
•
•
•
Overview of Physical Storage Media
Magnetic Disks, Tertiary Storage
Buffer Management
Storage Access
File Organization
Dept. of Computer Science
UC Davis
6. Storage and File Organization
ECS-165A WQ’11
111
Classification of Physical Storage Media
• Main criteria: Speed with which data can be accessed and cost per unit of data to buy medium
• Reliability
– data loss on power failure or system crash
– physical failure of the storage device
• Classification:
– volatile storage: loses contents when power is turned off
– non-volatile storage: contents persist when power is switched off
Physical Storage Media
• Cache: fastest and most costly form of storage; volatile; managed by the hardware and/or operating system
• Main Memory:
– general purpose instructions operate on data in main memory – fast access but in general too small to store the entire database (or even an entire relation)
– volatile – content of main memory is usually lost if a power failure or system crash occurs
Dept. of Computer Science
UC Davis
6. Storage and File Organization
ECS-165A WQ’11
112
• Magnetic-Disk Storage: primary medium for the long term storage of data; typically stores the entire database (i.e., all relations and associated access structures)
– data must be moved from disk to main memory for access and written back for storage (insert, update, delete, select) – direct-access, i.e., it is possible to read data on disk in any order – usually survives power failures and system crashes; disk failure, however, can destroy data, but is much less frequent than system crashes
• Optical Storage: non volatile; CD-ROM/DVD most popular form; Write-Once-Read-Many (WORM) optical disks are typically used for archival storage.
• Tape Storage: non-volatile, used