These three fields are the parameters used by tableBASE to control the automatic expansion of tables as they increase in size.
Field Name |
Minimum Value |
Maximum Value |
Default Value |
---|---|---|---|
Expansion Factor |
0.1 |
99.9 |
20.0 |
Lower Density |
0.1 |
99.9 |
50.0 |
Upper Density |
0.1 |
99.9 |
80.0 |
Non-hash tables will be set up initially with an allowance of free space for growth as indicated by the expansion factor. If a table is set up with the number of rows set to 100 and the expansion factor set to 20.0 percent, the table can grow to 120 rows before it requires expansion. When the table reaches 120 rows, it will be expanded by 20% to 144 rows, and so on. The density limit is ignored for non-hash tables.
The initial table size for a hashed table is set so that the expected number of rows in the table will represent the percentage set for the lower density. If the table is expected to contain 100 rows and the table is set with a lower density of 50%, then the initial space allocated for the table will be for 200 rows.
As successive additions are made to the table, the upper density limit may be reached. If the upper density is set to 80% then this will occur when there are 160 rows in the table. When this limit is reached, the table will be expanded to 320 rows in order to bring the density of the table back to the lower density that was set to 50%.