The underlying data structure for a NoSQL database is really the same as that for a relational database: the Map data structure (also called a dictionary or associative array), implemented in Java by the java.util.Map<K,V>
interface and the 19 classes that implement it. Among them is the HashMap<K,V>
class, which implements the classic hash table data structure. The type parameters K
and V
stand for key and value.
As described in Chapter 9, Recommender Systems the essential feature of the map data structure is its functional key-value mechanism. Like a mathematical function y=f(x), the key-value mechanism is an input-output process. In the mathematical context, x is the input and y is the output. In the data structure context, the key is the input and the value is the output.
Note that with a mathematical function, each x-value corresponds to only one y-value; you cannot have f(7) = 12 and f(7) = 16. In other words, the input values must be unique. In this...