Storage Order
Indexed sets can be used to store member records in a physical order that reflects the order of the member's db-key or symbolic key in the index, by defining the member record's storage mode as via (or clustered) an indexed set that is sorted on db-key or symbolic key.
Determining the Target Page
CA IDMS/DB determines the target page on which to store a member occurrence via an indexed set, as follows:
|
If this is the first record occurrence stored via a user-owned index set or a system-owned index with the same page range as the member record... |
CA IDMS/DB determines the target page as follows:
|
|
If this is the first record occurrence stored via a system-owned index with a separate page range from that of the member... |
The target page is the low page of the member's page range |
|
If other record occurrences have already been stored (that is, if the index is not empty)... |
CA IDMS/DB determines the target page, as follows:
|
Example
For example, the EMP-EXPERTISE set in the sample order entry database is an indexed set, and EXPERTISE records are stored in physical-sequential order based on the value of the SKILL-LEVEL field. The non-SQL schema DDL statements necessary to specify physical-sequential placement of the EXPERTISE record are as follows:
RECORD NAME EXPERTISE
LOCATION MODE VIA EMP-EXPERTISE SET ...
SET NAME EMP-EXPERTISE
ORDER SORTED
MODE INDEX ...
OWNER EMPLOYEE
MEMBER EXPERTISE ...
DESCENDING KEY SKILL-LEVEL ...
In this case, CA IDMS/DB stores each EXPERTISE record as close as possible to the record with the next lower SKILL-LEVEL.
|
Copyright © 2014 CA.
All rights reserved.
|
|