Key / Data pairings
Often, information is stored using key / data pairs. This means that every piece of data stored in one place is also tied to what is called a key, which is usually an integer number. The key can be used to retrieve a piece of data, or store a new piece of data.
A simple example:
Key |
Data |
42 |
"what is six by seven?" |
12 |
"monkeys" |
75 |
"significant data" |
So one could know only the key numbers and be able to retrieve and possibly change each of the strings attached to them. The name of a file and the contents of a file could be thought of as a key/data pair, as well as a URL and the web page it leads to. Telephone numbers and names, words and dictionary definitions, etc... Again, many data structures will use keys to locate information, keys that may be numbers or strings or chunks of binary data - so it's good to be comfortable with the concept.
