Another decision facing the designer is the makeup of the item-ID.
Here are a few guidelines for choosing an item-ID:
AQL delimiters in a file is not permitted.
The rest (system delimiters, control characters, spaces) can be accepted as characters in your item-IDs but are not advisable.
It is permitted to use the following characters within item-IDs:! # $ % & + - . / : ? @ _
For example, BOB.SMITH, BOB-SMITH, BOB_SMITH, and BOB/SMITH are all valid (and different) item-IDs. Also, keep in mind that the file may be case sensitive.
Each item-ID in a file must be unique.
An item-ID must be assigned to only one item in a file. Unique also means that the item-ID cannot be MultiValued, for example, the item cannot have more than one item-ID to reference the data in this item.
D3 has the ability to create item-IDs by default. D3 can generate an item-ID based on the date, time, and an internal counter. This creates a numeric item-ID nine digits long.
By using the ID processing code in the file-defining item, D3 creates item-IDs in numerical order, starting with the number provided.
Calling a FlashBASIC program subroutine from an FDI correlative.
Choose item-IDs that hash well.
Hashing describes how items are distributed among the groups in the file. An ideal situation would be that every group holds an equal number of items. In reality, the distribution of items may not be so even. D3 handles these inconsistencies well, so the system performance degradation they cause is negligible. The actual hashing scheme is described elsewhere, but because of the way the algorithm works, the right characters of the item-ID have the greatest influence on the group to which an item is assigned. This means that sequential alphabetic or numeric item-IDs hash better. Item-IDs should not be assigned in even multiples (411000, 412000, 413000, and so on) as this may cause an uneven distribution of the items in the groups. The istat command shows how items are placed within groups of existing files.
Limit the size of the item-ID to as few bytes as possible.
Access allows item-IDs as large as 101 characters, but only the first 24 are significant.
In general, smaller is better. Item-IDs less than ten characters long are encouraged. This keeps disk usage to a minimum and it improves the speed of AQL commands, although the increase may be imperceptible in small files.
Choose item-IDs that sort well if the items are sorted by the item-ID often.
If the item-ID is strictly alphabetic or strictly numeric, the results are straightforward. But if the item-ID is partially alphabetic and partially numeric, a sorted list shows the following item-IDs in this order: w2, w3, w399, w4, and w401.
To sort the item-IDs numerically, (for example, w2, w3, w399, w4, and w401) a FlashBASIC program called from the file-defining item correlative is needed to create an index, or use a synonym attribute-defining item with right alignment for attribute zero.
As a reminder, D3 can use the ID correlative code in the file-defining item to automatically assign sequential item-IDs.