Pathmaker Programming Guide

Creating a DB Requester Application
Pathmaker Application Development Overview
067868 Tandem Computers Incorporated 3–31
Additional Considerations
for DB Requesters
Accessing NonStop SQL
Tables
When a table is defined in NonStop SQL DDL, a primary access path to the table is
specified by defining a primary key, and an alternate access path to the table is
specified by creating an index. When end users query a table, however, they are not
restricted to reading the table along the primary access path or alternate access path.
NonStop SQL allows a query on a table on any column. Queries on columns that are
part of the primary or alternate access path are the most efficient.
When you create a NonStop SQL DB requester, you can restrict the end user to queries
on columns that are part of the primary or alternate access path. You enforce this
restriction by selecting
N
on the Nonindex Reads field of the Record Instance Detail
screen. You can allow queries on any column by selecting
Y
on the Nonindex Reads
field.
Pathmaker DB requesters promote efficient queries by selecting and marking fields on
the application screen that, when selected for a read, will result in the most efficient
SQL queries. The end user sees these efficient access fields marked with an asterisk
or a plus sign on the application screen. The asterisk marks the primary access path,
and the plus signs mark alternate access paths.
The Pathmaker product identifies efficient access fields in two steps: first, by
identifying efficient keys, and then by identifying and marking efficient access fields
within those efficient keys. Efficient keys are a subset of all possible SQL primary keys
and indexes. The Pathmaker product applies a set of efficiency rules to the keys and
indexes in a table to determine if a key or index is efficient.
The rules the Pathmaker product follows to determine which columns are efficient
keys and which columns are efficient access fields are described in the following
pages.
Rules for Determining Efficient Keys
The Pathmaker product identifies efficient keys in a table by looking for keys and
indexes that meet the following requirements:
In a protection view, all columns that form the primary key or index must be
included in the view.
If you used a SYSKEY instead of declaring a primary key, the SYSKEY must be
included in the protection view.
If you want to include a nonunique index in a protection view, you must also
include the complete primary key. Again, if you used a SYSKEY instead of
declaring a primary key, the SYSKEY must be included in the view.