Oracle NoSQL Database Key-Value Pairs

In its simplest form, Oracle NoSQL Database implements a map from user-defined keys (formatted as Strings) to opaque data items. It records version numbers for key/data pairs, but maintains the single latest version in the store. Applications need never worry about reconciling incompatible versions because Oracle NoSQL Database uses single-master replication; the master node always has the most up-to-date value for a given key, while read-only replicas might have slightly older versions. Applications can use version numbers to ensure consistency for read-modify-write operations.

Key Value


Oracle NoSQL Database hashes keys to provide good distribution over a collection of computers that provide storage for the database. However, applications can take advantage of subkey capabilities to achieve data locality.

A key is the concatenation of a Major Key Path and a Minor Key Path, both of which are specified by the application. All records sharing a Major Key Path are co-located to achieve data locality. Within a co-located collection of Major Key Paths, the full key, comprised of both the Major and Minor Key Paths, provides fast, indexed lookup.

For example, an application storing user profiles might use the profile-name as a Major Key Path and then have several Minor Key Paths for different components of that profile such as email address, name, phone number, etc. Because applications have complete control over the composition and interpretation of keys, different Major Key Paths can have entirely different Minor Key Path structures. Continuing our previous example, one might store user profiles and application profiles in the same store and maintain different Minor Key Paths for each.

Prefix key compression makes storage of key groups efficient.


The value field is stored as a arbitrary byte array. Oracle NoSQL Database makes no internal assumptions about the structure or the data stored within the byte array. Mapping of the byte arrays to data structures (serialization and deserialization) is left up to the application. Applications with very simple data requirements may use values containing simple, fixed record structures. Other applications may use values containing complex structures, a set of named properties (name-value pairs) or other types of self-describing data formats.

There are no restrictions on the size or structure of the value field.