HP Integrity NonStop J-Series User Manual

Page 239

Advertising
background image

Sample Project-Tracking System
Identifying Key Fields

In the "events" and "respfor" files, however, neither a
"proj-code" nor an "event-num" alone is sufficient to
identify a record uniquely. Each record in those files can be
uniquely identified only by a combination of both "proj-code" and
"event-num." Therefore, the primary key for these files must be
a composite key group consisting of both "proj-code" and
"event-num."

In addition to a primary key for each file, you may want to
identify one or more alternate keys. The value of an alternate
key field need not uniquely identify a record, but instead,
provides an access path sorted in an alternate order. For
example, while the "proj-desc" field of the "projects" file may
have duplicate values, you can use this field as an alternate key
field to display all projects with the same description.

When a key from one file appears as a field in a related file,
you should make that field an alternate key in the related file
as well. This provides you with the means to link the files
within a multifile application.

Figure 12-8 shows a chart that illustrates the possible
relationships between the files and keys used by the project-
tracking system.

12-11

Advertising
This manual is related to the following products: