SQL/MP Installation and Management Guide

Understanding and Planning Database Tables
HP NonStop SQL/MP Installation and Management Guide523353-004
3-10
Relative File Structure
Figure 3-2 on page 3-10 illustrates the structure of an entry-sequenced file.
The primary key of an entry-sequenced file is a four-byte record address external to
the data record and consisting of a block number and a record number within the
block. This address is typically used and manipulated internally by the file system, and
there is usually no reason for you to know its value. Programs can, however, obtain the
address of the record just read or written by calling the
FILE_GETINFO[LIST][BYNAME]_ file-system procedure (for a D-series version of the
Guardian operating system), or the FILEINFO or FILERECINFO file-system procedure
(for a C-series version of the Guardian operating system).
After creating the file, you can perform four types of operations on the file:
Insert new records at the end of the file
Retrieve records from the file
Specify an alternate access path through an index and then retrieve records that
contain the key values specified by the index
Update records (rows) of the file, without increasing the record length
Relative File Structure
Relative files consist of fixed-length physical records accessed by relative record
number. A record number is an ordinal value and corresponds directly to the record’s
Figure 3-2. Entry-Sequenced File Structure
DataData DataDataData Unused
DataData DataData Unused
DataData DataDataData Unused
Variable-Length
Physical Records
VST003.vsd
1st
Record
2nd
Record
3rd
Record
4th
Record
5th
Record
6th
Record
7th
Record
8th
Record
9th
Record
10th
Record
11th
Record
12th
Record
13th
Record
14th
Record
Data
Blocks