IMSAM Composite Keys [ Information Access Server: Database Administration ] MPE/iX 5.0 Documentation
Information Access Server: Database Administration
IMSAM Composite Keys
IMSAM supports a feature called composite keys, which are constructed
from parts of one or more data items in a dataset. For example, suppose
DATABASE1 has data items ACCTNUM and DEPTNUM, each three bytes long, and
DATABASE2 has a data item ACCTDEPT that holds the ACCT number and DEPT
number merged into one field.
This appendix shows you how a view table with SUB and concatenation
functions would let you JOIN data from these two databases. The same
result could be achieved with IMSAM composite keys.
DATABASE2, which has the 6-character field ACCTDEPT, could make composite
keys for the first three bytes and second three bytes of ACCTDEPT. These
keys could be used for fast keyed JOINs of tables from DATABASE1 and
DATABASE2. Alternatively, DATABASE1 could make one composite key built
from ACCTNUM and DEPTNUM, and use this for fast keyed JOINs with the
ACCTDEPT field in DATABASE2.
MPE/iX 5.0 Documentation