Fujitsu UDS/SQL V2.5 Manual Do Utilizador
Types of access
Schema DDL
98
U929-J-Z125-9-76
Sorting member records according to primary key values
⎧DATABASE-KEY ⎫
ORDER IS SORTED BY
⎨ ⎬
.
⎩DEFINED KEYS DUPLICATES ARE[ NOT] ALLOWED⎭
.
.
.
⎧ASCENDING ⎫
⎨ ⎬ KEY IS item-name,...
⎩DESCENDING⎭
ORDER IS SORTED BY DEFINED KEYS DUPLICATES ARE[ NOT] ALLOWED
Items defined as keys with this ORDER clause are primary keys of a set.
UDS/SQL sorts the member records of the set occurrences according to the values of the
primary key (which may consist of one or several items of a member record type) either in
ASCENDING or DESCENDING order. If the key consists of several items, it is a compound
key.
UDS/SQL sorts the member records of the set occurrences according to the values of the
primary key (which may consist of one or several items of a member record type) either in
ASCENDING or DESCENDING order. If the key consists of several items, it is a compound
key.
item-name
specifies the item(s) comprising the key. When inserting new member records in
a set occurrence, UDS/SQL automatically selects the position corresponding to the key
value. If the user changes key values in the database, UDS/SQL automatically updates the
sequence of the associated member records.
value. If the user changes key values in the database, UDS/SQL automatically updates the
sequence of the associated member records.
DUPLICATES ARE [NOT] ALLOWED specifies whether UDS/SQL is to accept or reject
duplicate key values.
duplicate key values.
If DUPLICATES ARE ALLOWED is specified, member records with identical key values are
sorted by database key values in ascending order.
sorted by database key values in ascending order.
The primary key does not only determine the sequence of the member records within a set
occurrence. If, by means of SSL, a storage mode is established which causes UDS/SQL to
set up a table in order to sort a set occurrence (see
occurrence. If, by means of SSL, a storage mode is established which causes UDS/SQL to
set up a table in order to sort a set occurrence (see
; pointer array, list), UDS/SQL
also uses the table as a direct access path.
In this case the above clause must be supplemented by INDEXED, which results in the
creation of a multi-level table (see
creation of a multi-level table (see
).