Fujitsu UDS/SQL V2.5 사용자 설명서

다운로드
페이지 324
Defining an item
Schema DDL
64
  
 U929-J-Z125-9-76
4.2.7
Defining a database key item 
                                 ⎧DATABASE-KEY.     ⎫  
[level-number ]item-name TYPE IS 
⎨                  ⎬
                                 
⎩DATABASE-KEY-LONG.⎭
Database key items are binary items that are intended for storing database key values. At 
the same time, they are the only items whose contents are interpreted by UDS/SQL as 
database key values. 
Database key items must be defined by the database programmer if the database key 
values are not implicitly defined by UDS/SQL (see sectio
). 
level-number
 denotes whether the item is part of a repeating group:
If the item is not to be part of a repeating group, the specified level number should be the 
smallest level number in the whole record type.
This is especially important if the item is to be used as a key item. 
If the item is to be part of a repeating group, proceed as described on 
A database key item can be defined as an item of type DATABASE-KEY or 
DATABASE-KEY-LONG:
A DATABASE-KEY item is a binary item of 4-byte length with a value range from
0 - 2
31
-1.
A DATABASE-KEY-LONG item is a binary item of 8-byte length with a value range from 
0 - 2
63
-1. Note that the bit positions 17 - 32 (from the left) are not evaluated by 
UDS/SQL. 
The structure of database key values is described in detail on 
.
    A database key item must be supplied with values by the database programmer. 
This allows the database programmer to independently define the database key 
value used by UDS/SQL (see LOCATION MODE clause on 
). 
Note, however, that the content of the database key item need not always match the 
value used internally by UDS/SQL for the database key of the record.
i