Skip to content
Related Articles
Open in App
Not now

Related Articles

Storage Types in DBMS

Improve Article
Save Article
  • Difficulty Level : Hard
  • Last Updated : 19 Mar, 2022
Improve Article
Save Article

The records in databases are stored in file formats. Physically, the data is stored in electromagnetic format on a device. The electromagnetic devices used in database systems for data storage are classified as follows :

 Data storage

  • Primary Memory: The primary memory of a server is the type of data storage that is directly accessible by the central processing unit, meaning that it doesn’t require any other devices to read from it. The primary memory must, in general, function flawlessly with equal contributions from the electric power supply, the hardware backup system, the supporting devices, the coolant that moderates the system temperature, etc. The size of these devices is considerably smaller and they are volatile. According to performance and speed, the primary memory devices are the fastest devices, and this feature is in direct correlation with their capacity. These primary memory devices are usually more expensive due to their increased speed and performance.
  • Secondary Memory: Data storage devices known as secondary storage, as the name suggests, are devices that can be accessed for storing data that will be needed at a later point in time for various purposes or database actions. Therefore, these types of storage systems are sometimes called backup units as well. Devices that are plugged or connected externally fall under this memory category, unlike primary memory, which is part of the CPU. The size of this group of devices is noticeably larger than the primary devices and smaller than the tertiary devices. It is also regarded as a temporary storage system since it can hold data when needed and delete it when the user is done with it.  Compared to primary storage devices as well as tertiary devices, these secondary storage devices are slower with respect to actions and pace. It usually has a higher capacity than primary storage systems, but it changes with the technological world, which is expanding every day. Secondary storage systems nowadays consist of magnetic disks and optical discs such as DVD or CD, which were used in earlier times. The constructive development of technology has brought about modern devices that have made it easier for users to handle multiple devices. In addition to portable hard disks and reusable flash drives, peripheral devices are equipped with USB ports so that they can be used as secondary storage devices through plug-and-play. RAID is a network of redundant storage devices that will fill the shortcomings of one device by connecting to another device in the chain. This machine uses processes such as array data arrangement for structuring, mirroring, error correction codes, isolating disks into multiple disks, etc. to ensure that data flows smoothly through. RAID levels range from RAID 0, RAID 1, RAID 2, and so on. Based on the redundancy observed in the stored data, these levels are planned and determined.
  • Tertiary Memory: For data storage, Tertiary Memory refers to devices that can hold a large amount of data without being constantly connected to the server or the peripherals. A device of this type is connected either to a server or to a device where the database is stored from the outside. Due to the fact that tertiary storage provides more space than other types of device memory but is most slowly performing, the cost of tertiary storage is lower than primary and secondary. As a means to make a backup of data, this type of storage is commonly used for making copies from servers and databases. The ability to use secondary devices and to delete the contents of the tertiary devices is similar.

Memory Hierarchy: 

A computer system has a hierarchy of memory. Direct access to a CPU’s main memory and inbuilt registers is available. Accessing the main memory takes less time than running a CPU. Cache memory is introduced to minimize this difference in speed. Data that is most frequently accessed by the CPU resides in cache memory, which provides the fastest access time to data. Fastest-accessing memory is the most expensive. Although large storage devices are slower and less expensive than CPU registers and cache memory, they can store a greater amount of data. 

Magnetic Disks: Present-day computer systems use hard disk drives as secondary storage devices. Magnetic disks store information using the concept of magnetism. Metal disks are coated with magnetizable material to create hard disks. Spindles hold these disks vertically. As the read/write head moves between the disks, it de-magnetizes or magnetizes the spots under it. There are two magnetized spots: 0 (zero) and 1 (one). Formatted hard disks store data efficiently by storing them in a defined order. The hard disk plate is divided into many concentric circles, called tracks. Each track contains a number of sectors. Data on a hard disk is typically stored in sectors of 512 bytes.

Redundant Array of Independent Disks: In Redundant Array of Independent Disks technology, two or more secondary storage devices are connected so that the devices operate as one storage medium. A RAID array consists of several disks linked together for a variety of purposes. Disk arrays are categorized by their RAID levels.

  • RAID 0: At this level, disks are organized in a striped array. Blocks of data are divided into disks and distributed over disks. Parallel writing and reading of data occurs on each disk. This improves performance and speed. Level 0 does not support parity and backup.


  • RAID 1: Mirroring is used in RAID 1. A RAID controller copies data across all disks in an array when data is sent to it. In case of failure, RAID level 1 provides 100% redundancy.


  • RAID 2: The data in RAID 2 is striped on different disks, and Error Correction Code is recorded using Hamming distance. Similarly to level 0, each bit within a word is stored on a separate disk, and ECC codes for the data words are saved on a separate set of disks.  As a result of its complex structure and high cost, RAID 2 cannot be commercially deployed.


  • RAID 3: Data is striped across multiple disks in RAID 3. Data words are parsed to generate a parity bit. It is stored on a different disk. Thus, single disk failures can be avoided.


  • RAID 4: This level involves writing an entire block of data onto data disks, and then generating the parity and storing it somewhere else. At level 3, bytes are striped, while at level 4, blocks are striped. Both levels 3 and 4 require a minimum of three disks.


  • RAID 5: The data blocks in RAID 5 are written to different disks, but the parity bits are spread out across all the data disks rather than being stored on a separate disk.


  • RAID 6: The RAID 6 level extends the level 5 concept. A pair of independent parities are generated and stored on multiple disks at this level. A pair of independent parities are generated and stored on multiple disks at this level. Ideally, you need four disk drives for this level.


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!