Indexed Access Tables
Sometimes a simple mathematical transformation isn't powerful enough to make the jump from data like Age to a table key. Some such cases are suited to the use of an indexed access scheme.
When you use indexes, you use the primary data to look up a key in an index table and then you use the value from the index table to look up the main data you're interested in.
Suppose you run a warehouse and have an inventory of about 100 items. Suppose further that each item has a four-digit part number that ranges from 0000 through 9999. In this case, if you want to use the part number to key directly into a table that describes some aspect of each item, you set up an index array with 10,000 entries (from 0 through 9999). The array is empty ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access