Pathmaker Programming Guide
Defining Data for a Pathmaker Project
Preparing for Pathmaker Application Development
067868 Tandem Computers Incorporated 2–37
Defining Access Paths for NonStop SQL Tables
If your Pathmaker project will be used to create COBOL85 custom services that access
NonStop SQL tables and if you expect application developers to use the Pathmaker
product’s facility to generate SQL data manipulation statements, you should identify
the access paths that will be required.
Access paths are optional attributes of SQL table objects. Each access path identifies
an ordered set of columns of a table. Each SQL table object can have up to 40 named
access paths.
When an application developer uses the Pathmaker product to generate a SELECT or
FETCH operation, a valid access path for the operation must be specified. (The
Pathmaker product can be used to generate SQL data manipulation statements for
single tables only; however, the single table can be a shorthand view that contains a
join.)
The Pathmaker product creates a set of default access paths for each NonStop SQL
table that you register on the SQL Table Registration screen. You can create additional
access paths for a table and delete or modify existing access paths.
Access Path Attributes. There are two attributes associated with each access path that
are of interest to you if you are creating or using an access path. These attributes are
Efficient and Unique and are described as follows:
Efficient—Each access path has an Efficient attribute (Y for yes or N for no) that is
calculated by the Pathmaker product. The Efficient attribute is significant only for
FETCH operations.
The Pathmaker product designates an access path as efficient if the access path is a
prefix of an index the Pathmaker product evaluates as efficient.
An index must satisfy the following conditions to be evaluated by the Pathmaker
product as efficient:
All columns of the index are sorted in the same order; that is, either ascending
(ASC) or descending (DESC).
No column of the index is nullable.
And additionally for protection views, all columns of the index are visible
through the view.
An efficient access path must be a prefix of an efficient index. A prefix is one or
more contiguous columns of the index starting with the first column. For
example, if an efficient index consisting of columns A, B, and C exists for a table,
you can create the three following efficient access paths:
An access path consisting of columns A, B, and C
An access path consisting of columns A and B
An access path consisting of column A