Databases are stored in record-containing file formats. At the physical level, the actual data is stored on some devices in electromagnetic format. These storage devices can be classified generally into three types.
A computer system has a well-established memory hierarchy. A CPU has direct access to its primary memory and its built-in registers. Obviously, the access time of the main memory is less than the CPU speed. Cache memory will be introduced to decrease this speed mismatch. The fastest access time is given by cache memory and it includes data that is most frequently accessed by the CPU.
The most expensive one is the memory with the fastest entry. Larger storage devices are slow and less expensive, but compared to CPU registers or cache memory, they can hold huge amounts of data.
The most prevalent secondary storage devices in modern computer systems are disk drive drives. They are called magnetic disk because they store information using the notion of magnetization. Hard disk are made up of metal disk with magnetizable material coating. On a spindle, these disk are placed vertically. In between the disk, a read / write head travels and is used to magnetize or de-magnetize the position under it. You may identify a magnetisation spot as being 0 (zero) or 1 (one).
In order to effectively store data, hard disc are formatted in a well-defined order. A disc plate, called tracks, has several concentric circles on it. There is a further separation of each track into sectors. Usually, a sector on a hard disk stores 512 bytes of information.
RAID, or Independent Disk Redundant Array, is a technology for connecting and using multiple secondary storage devices as a single storage device.
In order to achieve different objectives, RAID consists of an array of disk in which several disk are connected together. RAID levels determine how disk arrays are used.
A striped array of disk is introduced at this level. The information is broken down into blocks and the blocks are distributed between disk. A block of data to be written / read in parallel is obtained by each disk. It improves the storage device's speed and efficiency. In Level 0, there is no parity and backup
RAID 1 uses mirroring techniques. When data is sent to a RAID controller, it sends a copy of data to all the disks in the array. RAID level 1 is also called mirroring and provides 100 percent redundancy in case of a failure.
RAID 2 uses Hamming distance to record Error Correction Code for its data, striped to different disk. Each data bit in a word is recorded on a separate disk, like level 0, and ECC codes for the data words are stored on a separate collection of disks. RAID 2 is not commercially available because of its complex structure and high cost.
The data is stripe to several disk by RAID 3. The parity bit created for the word data is stored on another disk. This technique allows single disc failures to be overcome.
At this point, a whole data block is written to data disk and then the parity is established and stored on another disk. Note that level 3 uses striping at the byte level, while level 4 uses striping at the block level. To implement RAID, both Level 3 and Level 4 need at least three disk.
RAID 5 writes entire data blocks to different disk, but instead of storing them on a different dedicated disks, the parity bits created for the data block stripe are distributed among all the data disks.
RAID 6 is a level 5 extension. Two independent parities are formed and stored between multiple disks in a distributed fashion at this level. Two parities have additional tolerance for defects. To implement RAID, this level requires a minimum of four disk drives.