Database Reference
In-Depth Information
Storage Management
Data in a relational table may be taken as a collection of records. For example, con-
sider a relational table containing customer data. Each row in the CUSTOMER
relational table refers to one specific customer. All the columns in each row refer
to the attributes of the particular customer. A table consists of rows, and each row
may be considered as a record. Thus customer data contained in the CUSTOMER
relational table are a collection of customer records.
Data in physical storage are kept as blocks. A block of data spans a given number
of physical disk tracks. A physical file has a certain number of disk blocks allocated
to it. For example, the customer file could be allocated 100 blocks. How much space
is then allocated to the customer file? That depends on how big the block size is.
File blocks may be specified in multiples of the block size determined in the oper-
ating system. If the operating system determines the block size to be 2K, then you
may have file blocks with sizes of 2K, 4K, and so on.
From the perspective of the higher levels of data storage software, data reside in
physical storage as files containing data blocks. Getting back to our customer table
example, customer records will reside in the blocks of the customer file. Depending
on the block size and the size of the customer records, a certain number of records
may be stored in one block. All of the customer records stored in the various blocks
make up the customer file. Figure 12-5 illustrates how records are stored in file
blocks. The figure also shows how file blocks are related to the storage sectors of
the storage medium.
DBMS and the operating system work together to manage the file blocks. They
continuously keep track of which blocks are filled up and which ones have room for
more records. They monitor the blocks that are being requested to be fetched and
those that are already fetched and in use. Storage management encompasses all
tasks to manage the movement of data in file blocks.
File-storage
blocks
Physical
storage
Collection of Records
Block1
SectorA
Block2
SectorB
Data in a
Relational
Table
Records
stored in
blocks
SectorC
Block3
……..
……..
Blockn
SectorN
(Fields in each record)
(disk, cylinder, track)
Figure 12-5
Data records in file storage blocks.
Search WWH ::




Custom Search