HP Integrity NonStop J-Series User Manual
Page 60
DEVELOPING A DATA BASE
Selecting the Appropriate File Type
Selecting the Appropriate File Type
You can select one of the following file types for your data base
files:
• Key-sequenced--In a key-sequenced file, each record has a
primary key and up to 255 alternate keys. If you select a
key-sequenced file type, you can delete, insert, read, and
update records in the file. To select a record you want to
read, you can use either the primary or alternate key.
• Relative--In a relative file, each record has a unique record
number and can have up to 255 alternate keys. The record
number is a unique value that corresponds to the physical
position of a record within the file. If you select a
relative file type, you can delete, insert, read, or update
records within the file. To select a record you want to read,
you can either use the record number as a primary key or use
an alternate key.
• Entry-sequenced--In an entry-sequenced file, each record has
a unique record number and up to 255 alternate keys. The
record number corresponds to the order in which a record is
stored in the file. If you select an entry-sequenced file
type, you can insert, read, or update records in the file; you
cannot, however, delete records from the file. To select a
record you want to read, you can either use the record number
as a primary key or use an alternate key.
• Unstructured--In an unstructured file, each record has a
unique record number that serves as a primary key. Alternate
keys cannot exist. If you select an unstructured file type,
you can insert, read, or update records in the file; you
cannot, however, delete records from the file. To select a
record you want to read, you must use the record number as a
primary key.
Generally, you should select a key-sequenced file type for your
data base files. This file type supplies you with the most
flexibility of use. Of the other file types, you might want to
select:
• A relative file type if you have a use for the record number
field
• An entry-sequenced file type if you plan always to enter data
in your file sequentially
3-9