The table organization indicates how table entries are to be ordered within the table. You can choose from the options listed in Table 155.
Option |
Table Organization |
---|---|
R |
Random |
U |
User Ordered |
S |
Ascending Sequential |
D |
Descending Sequential |
H |
Hash |
For a list of the permitted organization/search method combinations, see Table Organization/Search Method Combinations.
Random (R)
With a random organization, new rows are added at the end of the table. Since there is no systematic order to the table, searching must be done using the serial method.
User Ordered (U)
In a table with this organization, the ordering of rows is controlled entirely by the user. As a result, the system has no way of recognizing where a row may be stored, so the serial search must be used.
Sequential (S)
A sequentially organized table is sorted by key in ascending sequence. This organization allows for the use of various search techniques that exploit ordered keys. Insertion and deletion tends to be slower since other rows in the table must be moved to maintain the sequence.
Descending (D)
A table organized in descending order is sorted by key in descending sequence. This organization also allows various search techniques that exploit ordered keys. Insertion and deletion also tends to be slower since other rows in the table must be moved to maintain the sequence.
Hash (H)
In a Hash table, rows are positioned by an arithmetic operation performed on the key by tableBASE. Selecting a Hash organization causes the data to take up more space than other organization options, but allows rows to be retrieved and updated very quickly. The only search method that can be used with the Hash organization is a Hash search.