Databases are stored physically as files of records on some storage medium. This section will deal with the overview of avaiable storage media then briefly describes the magnetic storage devices.
1.1 Physical Storage Media
The collection of data in a database system must be stored physically on some storage medium. These storage media are classified by the speed with which data can be accessed, by the cost per unit of data to buy the medium and by the medium’s reliability. There are several typical storage media available:
- Cache memory: Cache memory is a primary storage media like the main memory. Data on these devices can be directly processed by the Central Processing Unit (CPU). Cache memory is the fastest but is also the most expensive form of storage.
- Main memory: Data that are available to be operated are stored in main memory. The machines instructions operate on main memory. Main memory is lower cost and also lower speed in compare with cache memory. However, main memory is generally too small to store the entire database. Main memory is volatile that means contents of main memory are lost in case of power outage.
- Flash memory : This memory is non-volatile and has fast access speed. However, the drawback of this is the complication when writing data to flash memory. Data in flash memory cannot be over written directly. To overwrite memory that has been written already, we have to erase an entire block of memory at once, it is then ready to be written again.
- Magnetic-disk storage: This is the primary medium for long-term storage of data. This is a type of secondary storages which usually have large capacity, cost less and volatile. Data in secondary storage such as magnetic disk cannot be access directly by CPU, first it must be copied into primary storage.
- Optical storage: The most popular optical storage is CD-ROM. In this device data are stored optically and are read by laser. CD-ROMs contains prerecorded data that cannot be overwritten. Optical storages are gigabytes in capacity and last much longer than magnetic disk. Optical jukebox memories use an arrays of CD-ROM platters which are loaded onto drives on demand.
- Tape storage: This storage is used for backup and archival data. Although magnetic tape is much cheaper than disks. access to data is much slower because taple must be accessed sequentially from the beginning. Tape jukeboxes are used to hold large collections of data and is becoming a popular tertiary storage.
In the next section, we will give brief revision of the physical charateristics of magnetic disk the most popular online storage for database system.
1.2 Magnetic Disk Devices
Magnetic disks are used for storing large amount of data. The capacity of disk is the number of bytes it can store.
Disk platter has a flat circular shape. Its two surface are covered with magnetic material and data is recorded on the surface. The disk surface is divided in to tracks , each track is a circle of distict diameter. Track is subdivided into blocks (sectors). Depending on the disk type, block size varies from 32 bytes to 4096 bytes. There may be hundreds of concentric tracks on a disk surface containing thousands of sectors. In disk packs, tracks with the same diameter on the various surfaces forms a cylinder
A disk typically contains many platters.
A disk is a random access addressable device. Transfer of data between main memory and disk takes place in units of disk block.
The hardware mechanism that reads or writes a block is the disk read/write head (disk drive) . A disk or disk packes is mounted into the disk drive, which includes a motor to rotate the disks. A read/write head include the electronic component attached to a mechanical arm. The arms moves the read/write heads, positions them precisely over the cylinder or tracks specified in a block address.






























