Home Technique Data block format

Data block format



Definition

Record the data of one page full of memory on the tape, which is called a data block. A data block consists of a block header, data space and free space.

When creating objects such as tables or indexes, the user can specify the storage parameters of the data block. The space utilization parameter of the data block is used to control the utilization of the space in the data segment and the index segment. Setting these parameter values ​​reasonably can save a lot of storage space and provide better performance. The concurrency parameter of the data block controls the number of concurrent transactions that use the block data. The storage parameters of data blocks are divided into two categories: control concurrency parameters, and control space utilization parameters.

Data block format refers to the organization of data records in a track. Such as addressing information, valid data, recording gaps, etc.

Each record in the data block format starts with a colon (:) and ends with a carriage return CR and line feed LF. Each record contains up to 32 ASC11 code bytes. All information is recorded with ASC11 code (7 bits, no parity bit). The last record is the "end-of-file record".

Content

(1) Common variable length header: Contains general information of the data block, such as block address and segment type.

(2) Table directory: contains the information of the table with row data in this block.

(3) Line directory: contains the information of the actual line data in this block (including the address of each line data slice in the line data area)

: (4) Free space : Storage space is needed when inserting a new row, and storage space may be increased when row data is updated. These storage spaces need to be allocated from free space.

(5) Row data: including table or index data, the storage of row data can span data blocks, that is, a row of data can be stored in different data blocks.

Classification

Fixed-length data block format

This data block format is a storage area with the outline area as a fixed-length data block. This format is characterized by its simple structure and can be directly addressed according to addressing information (cylinder surface number and sector number). The disadvantage is that the utilization rate of the recording area is not high.

Indefinite length data block format

The length of the data block of this format is variable, its addressing information and check information are more complicated, and the purpose is to use it more negatively. Storage space. The characteristic of this format is to improve reliability and flexibility, but its logic circuit is relatively complicated.

This article is from the network, does not represent the position of this station. Please indicate the origin of reprint
TOP