Figure 8-5, Structure of a key-sequenced file, Figure 8-6 – HP NonStop G-Series User Manual

Page 133: Creating a key-sequenced file with alternate keys

Advertising
background image

Using FUP for Advanced File Management

Guardian User’s Guide 425266-001

8- 11

File-Creation Examples

Creating a Key-Sequenced File With Alternate Keys

Besides having a primary key, a key-sequenced file can have one or more alternate keys.

Figure 8-5. Structure of a Key-Sequenced File

Figure 8-6. Possible Record Format: Key-Sequenced File With Alternate Keys

005

CDT

.CDD

Key-Sequenced
File:

Primary access is by
a value in the primary-
key field.

Example:
FIND "KING"

Record

Primary

Key

Key-
Sequenced
File

Records are stored in ascending order
of "primary key" field value.

ADAMS

BROWN

COLLINS

FISH

JACKSON

KING

MASTERS

OBRIEN

RYAN

WATSON

ZANTE

006

CDT

.CDD

Byte
Offset

[0]

[2]

[32]

[40]

[42]

[46]

[54]

Alternate

Key "VN"

Alternate
Key "LO"

Alternate

Key "AQ"

Primary

Key

partno

descr

price

avail^qty

loc

vendor

Advertising
This manual is related to the following products: