Pathmaker Programming Guide
Creating a DB Requester Application
Pathmaker Application Development Overview
3–20 067868 Tandem Computers Incorporated
Using NonStop SQL Keys
If an asterisk (*) appears to the left of a label on a DB requester application screen, the
label identifies a primary key column. If a plus sign (+) appears to the left of the label
on a DB requester application screen, the label identifies an index column. SYSKEYs
are generally not displayed. The end user enters information in these key columns on
the screen to indicate to which row an operation applies.
Primary Key. An end user of a DB requester application that accesses NonStop SQL
tables can read a particular row by designating a legal value in the screen’s primary
key column(s) (indicated by an *) and then pressing the appropriate function key.
After a row is read, it can be deleted or updated. The end user can add a new row by
filling in the primary key column(s) and any other necessary columns and then
pressing the function key for INSERT.
Index. An end user of a DB requester application can designate a single row or a set of
rows to be read by filling in the screen column(s) indicated by a +. The + is associated
with an index. For example, if the end user enters “SMITH” in the employee name
field (Figure 3-7) and presses F7 for Read Exact, the application will return the
information for the first employee named SMITH from the database. Then, by
pressing F5–Read Next, the end user causes the application to read the next SMITH in
the database until there are no more SMITHs.
SYSKEY. Generally, the primary key columns or index columns are used to identify the
rows to be acted upon in a DB requester application. SYSKEYs usually do not appear
on the end user’s screen.
If a DB requester application displays a SYSKEY, it will be used in the same manner as
a primary key for reads, deletes, and updates. If a row is to be added, however, the
system will generate the value of the SYSKEY regardless of what the end user enters in
the SYSKEY column.
Note If a READ APPROXIMATE is requested for a NonStop SQL table that has a multicolumn key, only the
value entered in the first column of the key is used to determine which row to read first. For example, if a
table has a three-column key and the end user enters 3, 6, 2 on the screen in the corresponding key
columns, the application ignores the values in the second and third columns. The first row with the first
column greater than or equal to three (“3, 0, 1”, for example) is returned first.