Do any of the main document-oriented database systems compress keys in their JSON documents?

I would like to store a large number of JSON documents using a document-oriented database, all with a very similar schema (although not identical).

One example document:

{ "firstName": "John", "lastName": "Smith", "age": 25, } 

Does any system (CouchDB, etc.) use compression (of any type) to avoid re-storing key lines (for example, "firstName")?

My motivation is to minimize the size of the database on disk when there are millions of documents, especially if some duplicate keys are much longer than, for example, "FirstName".

Thanks for your thoughts!

W


Edit : after thinking about this, I am thinking about a specific case of a more general compression system in which the compression dictionary (partially?) Is divided into several compressed documents in the document repository (and, probably, over time). Then this will handle the compression of not only the JSON keys.

It would be interesting to do!

+4
source share
1 answer

I would just add a key mapping document in which you store keys and their shortcuts ... doing the mapping in your backend should not be such a big problem ...

 { FirstName: 'a', Town: 'b' } { a: 'Peter', b: 'Zurich' } 
+2
source

Source: https://habr.com/ru/post/1338864/


All Articles