Pathmaker Programming Guide

Creating a DB Requester Application
Pathmaker Application Development Overview
3–34 067868 Tandem Computers Incorporated
Rule 3: Efficient Multicolumn Join. For a child joined to a parent on the first column of an
efficient multicolumn key, the second column is an efficient access field if it is
displayed. You could have several efficient access fields of this type.
Assume you have the following SQL DDL:
CREATE TABLE SUPPLIER
(
SUPPLIER_NUM PIC 9 COMP,
SUPPNAME PIC X(20),
PRIMARY KEY (SUPPLIER_NUM, SUPPNAME)
)
ORGANIZATION KEY SEQUENCED;
CREATE TABLE FROMSUPP
(
SUPPLIER_NUM PIC 9 COMP,
PARTNUM PIC 9 COMP,
DESCRIPTION PIC X(30),
PRIMARY KEY (SUPPLIER_NUM, PARTNUM) <-- Multicolumn
) primary key
ORGANIZATION KEY SEQUENCED;
SUPPLIER (parent) is joined to FROMSUPP (child) on
SUPPLIER_NUM.
PARTNUM is an efficient access field for FROMSUPP.
If the table were structured like the example for Rule 2, with a single column primary
key on SUPPLIER_NUM, PARTNUM would not be an efficient access field.