3bst0r
3bst0r

Reputation: 35

Does Couchbase Server have a binary JSON storage format?

MongoDB has BSON, ArangoDB has VelocyPack, Postgresql has Jsonb,...

Does Couchbase also have its own binary format to work with JSON documents?

Upvotes: 1

Views: 374

Answers (1)

dnault
dnault

Reputation: 8909

It's possible that Couchbase Server uses a binary JSON storage format internally (I work at Couchbase but not on the server team, so I don't know), but from a user's perspective, as of Couchbase 7.1 in the year 2022, with the server-side SDKs, the answer is no.

You can store any kind of binary data in Couchbase (CBOR, Avro, protobuf, jpeg, etc.) but the server treats anything that isn't JSON as a blob. You cannot query the contents of a blob with N1QL or Full-Text Search, and you cannot perform subdocument operations on it.

The good news is that it typically doesn't matter. Instead of a user-facing binary JSON format, Couchbase uses transparent Snappy compression. As a user, you can work with ordinary JSON and let Couchbase handle the details of sending/storing it efficiently.

Upvotes: 2

Related Questions