Definition: The part of a group of data by which it is sorted, indexed, cross referenced, etc.
See also dictionary, heap, sort.
Note: For instance, to sort customer records alphabetically, the key is the last name, then the given names. Other information, such as the address, outstanding balance, credit limit, etc. do not matter in sorting the records alphabetically. Different keys may be used at different times, for instance, an accounting report may need customers with larger balances first, so the records could be sorted using the outstanding balance as the key.
If you have suggestions, corrections, or comments, please get in touch with Paul Black.
Entry modified 17 December 2004.
HTML page formatted Fri Feb 23 10:06:07 2018.
Cite this as:
Paul E. Black, "key", in Dictionary of Algorithms and Data Structures [online], Vreda Pieterse and Paul E. Black, eds. 17 December 2004. (accessed TODAY) Available from: https://www.nist.gov/dads/HTML/key.html