The Data Model

Couchbase’s use of JSON as a storage format allows powerful search and query over documents. Several data structures are supported by the other SDKs, including map, list, queue, and set.

The power to search, query, and easily work with data in Couchbase, comes from the choice of JSON as a storage format. Non-JSON storage is supported — see the Binary Storage Documentation — including UTF-8 strings, raw sequences of bytes, and language specific serializations, however, only JSON is supported by Query.

In Couchbase, JSON’s key-value structure allows the storage of collection data structures such as lists, maps, sets and queues. JSON’s tree-like structure allows operations against specific paths in the Document, and efficient support for these data structures. The data structure API is not available in the C SDK, but the sub-document API (which the data structure feature uses) can be used to attain the same results with the same performance profile. The best way to inter-operate with data structures as provided by other Couchbase SDKs is to use either full-document operations or sub-document operations.