A chosen set of columns which uniquely identify a table. In the relational model (as in set theory) the columns of a primary key are not ordered. In SQLI they must be, in order to map to the quasi- hierarchical model of M globals. FileMan subfiles (multiples) have a primary key element for each parent plus one for the subfile. Each contains a pointer to its primary key table element (SQLI_TABLE-ELEMENT), a sequence and a column in the local base table (SQL_COLUMN).
.01p tbl element(+)0;1POINTER1.5216BIEN of table element in SQLI_TABLE_ELEMENT
1p column(+)0;2POINTER1.5217DIEN of column in SQLI_COLUMN corresponding to this primary key
2p sequence(+)0;3NUMERICSequence number of primary key
3p start at0;4FREE TEXTInitial value of key before a $ORDER loop
4p end if1;E1,245FREE TEXTM expression in key value, {K}, which, if false, ends the $ORDER loop
5p row count0;5NUMERICEstimated number of rows per record set at this level
6p preselect2;E1,245FREE TEXTCode to be executed before selecting this key, before optimization.
7p key format0;6POINTER1.5213Key formats map internal storage values to their value when used as keys. In general, information is lost in the process; they can't be converted back. This means data must be converted to key format before it can be compared to such a key.

Referenced by 1 types

  1. SQLI_FOREIGN_KEY (1.5219) -- f_pk_element