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:
- Primary Memory
- Secondary Memory
- Tertiary Memory
Types of Memory1. 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.
The cache is one of the types of Primary Memory.
- Cache Memory: Cache Memory is a special very high-speed memory. It is used to speed up and synchronize with a high-speed CPU. Cache memory is costlier than main memory or disk memory but more economical than CPU registers. Cache memory is an extremely fast memory type that acts as a buffer between RAM and the CPU.
2. 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.
Some commonly used Secondary Memory types that are present in almost every system are:
- Flash Memory: Flash memory, also known as flash storage, is a type of nonvolatile memory that erases data in units called blocks and rewrites data at the byte level. Flash memory is widely used for storage and data transfer in consumer devices, enterprise systems, and industrial applications. Unlike traditional hard drives, flash memories are able to retain data even after the power has been turned off
- Magnetic Disk Storage: A Magnetic Disk is a type of secondary memory that is a flat disc covered with a magnetic coating to hold information. It is used to store various programs and files. The polarized information in one direction is represented by 1, and vice versa. The direction is indicated by 0.
3. 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.
Some commonly used Tertiary Memory types that are almost present in every system are:
- Optical Storage: It is a type of storage where reading and writing are to be performed with the help of a laser. Typically data written on CDs and DVDs are examples of Optical Storage.
- Tape Storage: Tape Storage is a type of storage data where we use magnetic tape to store data. It is used to store data for a long time and also helps in the backup of data in case of data loss.
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.
1. 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.
2. Redundant Array of Independent Disks(RAID)
In the 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 occur on each disk. This improves performance and speed. Level 0 does not support parity and backup.
Raid-0- 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-1- RAID 2: The data in RAID 2 is striped on different disks, and the 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-2- 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-3- 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-4- 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-5- 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.
Raid-6Storage Hierarchy
Rather than the storage devices mentioned above, there are also other devices that are also used in day-to-day life. These are mentioned below in the form of faster speed to lower speed from top to down.
Storage HierarchyConclusion
A DBMS must balance the utilization of primary, secondary, and tertiary memory. Secondary memory meets long-term storage demands, tertiary memory can be used for archiving, and primary memory guarantees quick access for active data. Using various storage types strategically in accordance with needs and patterns of data access is essential for optimal database performance.
Similar Reads
Volatile Storage in DBMS
Volatile memory in the context of Database Management Systems (DBMS) causes the stored data to be lost depending on whether there is a source of power or none. Just when the engine is put in a standby or shut-down situation, any data stored in volatile memory vanishes. The comparison is drawn with a
10 min read
Non-Volatile Storage in DBMS
An integral part of the DBMS world is non-volatile storage, which is responsible for keeping information reliable and longer-lasting. This article focuses on high-detailed knowledge about DBMS non-volatile storage systems, comprising definitions, explanations, and insights by only using the material
7 min read
Types of Distributed DBMS
A system that is used for managing the storage and retrieval of data across multiple interconnected databases is called a Distributed Database Management System(DDBMS). In this case, the interconnected databases are situated in different geographical areas. In DDBMS, one can access and store data tr
4 min read
Types of OLAP Systems in DBMS
OLAP is considered (Online Analytical Processing) which is a type of software that helps in analyzing information from multiple databases at a particular time. OLAP is simply a multidimensional data model and also applies querying to it. Types of OLAP ServersRelational OLAPMulti-Dimensional OLAPHybr
6 min read
Use of DBMS in System Software
Here we are going to discuss about how a user interacts with a DBMS, and how the DBMS is related to system software. Using a general-purpose programming language, user can write a source program in the normal way. However, instead of writing I/O statements of the form provided by the programming lan
5 min read
Distributed Storage Systems
In today's world where everything revolves around data, we need storage solutions that are fast and reliable and able to handle huge amounts of information. The old way of storing data in one place is no longer enough because there's just too much data created by all the apps and services we use dai
11 min read
History of DBMS
The first database management systems (DBMS) were created to handle complex data for businesses in the 1960s. These systems included Charles Bachman's Integrated Data Store (IDS) and IBM's Information Management System (IMS). Databases were first organized into tree-like structures using hierarchica
7 min read
Last Minute Notes - DBMS
Database Management System is an organized collection of interrelated data that helps in accessing data quickly, along with efficient insertion, and deletion of data into the DBMS. DBMS organizes data in the form of tables, schemas, records, etc. DBMS over File System (Limitations of File System)The
15+ min read
Storage Concepts in System Design
In system design, storage concepts play an important role in ensuring data reliability, accessibility, and scalability. From traditional disk-based systems to modern cloud storage solutions, understanding the fundamentals of storage architecture is crucial for designing efficient and resilient syste
9 min read
Base Properties in DBMS
Pre-requisites: ACID Properties in DBMS The BASE properties of a database management system are a set of principles that guide the design and operation of modern databases. The acronym BASE stands for Basically Available, Soft State, and Eventual Consistency. Basically Available This property refers
2 min read