Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What is the concept of data storage in the database

2025-04-05 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

This article mainly introduces "what is the concept of data storage in the database". In the daily operation, I believe that many people have doubts about what the concept of data storage in the database is. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful to answer the doubts about "what is the concept of data storage in the database?" Next, please follow the editor to study!

Sector

Sectors, as the name implies, each disk has multiple concentric circles like tracks, which are divided into multiple parts. The arc length of each part is added to the two radii of the center of the circle to form a sector, so it is called a sector. The sector is the smallest unit of physical storage in the disk. Typically, the size of each sector is 512 bytes. (due to increasing disk size, some manufacturers set the size of each sector to 4096 bytes.)

Cluster / Block (block)

Logical level: disk blocks (virtual). Block is the smallest logical storage unit in the operating system. The smallest unit in which the operating system deals with disks is the disk block.

Popularly speaking, it is called cluster in Windows file systems such as NTFS and block in Linux file systems such as Ext4. Each cluster or block can include 2, 4, 8, 16, 32, 64... 2 to the nth power of sectors.

Advantages of disk block storage:

Easy to read: because the number of sectors is relatively small, a large number of it is difficult to address, so the operating system combines the adjacent sectors together to form a block, and then operates the block as a whole.

Separate dependence on the underlying layer: the operating system ignores the design of the underlying physical storage structure. Through the concept of virtual disk block, the block is considered to be the smallest unit in the system.

Disk block mapping

The function of disk controller is not only to read data and control magnetic head, but also to map the relationship between sector and disk block.

The basic unit of reading and writing to a disk

The basic unit of disk reading and writing is the sector. The principle of disk, physical implementation, disk controller is in accordance with the sector of this unit to read and other operational data. The operating system uses block clusters as units to read data and other operations.

The file system is part of the operating system, so the smallest unit of file that the file system operates on is the block.

The relationship between blocks and pages

The operating system often communicates with two storage devices, memory and hard disk, similar to the concept of "block", which requires a virtual basic unit. So, with memory operation, it is the concept of a virtual page to act as the minimum unit. Dealing with hard drives is based on blocks as the smallest unit.

At this point, the study of "what is the concept of data storage in the database" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report