"Associative table" redirects here. For the relation used in database systems to resolve many-to-many relationship, see Associative entity.
In computer science, an associative array, key-value store, map, symbol table, or dictionary is an abstract data type that stores a collection of (key, value) pairs, such that each possible key appears at most once in the collection. In mathematical terms, an associative array is a function with finitedomain.[1] It supports 'lookup', 'remove', and 'insert' operations.
The dictionary problem is the classic problem of designing efficient data structures that implement associative arrays.[2]
The two major solutions to the dictionary problem are hash tables and search trees.[3][4][5][6]
It is sometimes also possible to solve the problem using directly addressed arrays, binary search trees, or other more specialized structures.
Many programming languages include associative arrays as primitive data types, while many other languages provide software libraries that support associative arrays. Content-addressable memory is a form of direct hardware-level support for associative arrays.
The name does not come from the associative property known in mathematics. Rather, it arises from the association of values with keys. It is not to be confused with associative processors.
^Collins, Graham; Syme, Donald (1995). "A theory of finite maps". Higher Order Logic Theorem Proving and Its Applications. Lecture Notes in Computer Science. Vol. 971. pp. 122–137. doi:10.1007/3-540-60275-5_61. ISBN978-3-540-60275-0.
^Andersson, Arne (1989). "Optimal Bounds on the Dictionary Problem". Proc. Symposium on Optimal Algorithms. Lecture Notes in Computer Science. Vol. 401. Springer Verlag. pp. 106–114. doi:10.1007/3-540-51859-2_10. ISBN978-3-540-51859-4.
^Cite error: The named reference gt was invoked but never defined (see the help page).
^Cite error: The named reference ms was invoked but never defined (see the help page).