I am thinking about using snake_case in my mongoDB-documents due to convention in the project. As I researched here, camelCase seems to be a standard in mongodb due to its BSON-storage.
My documents are for example
{
"created_at": "",
"issuer": "my-user-name",
"document_id": "81234-guid",
"file_id": "81234-another-guid",
"details": {
...
}
}
As you see, I under snake_case. That means that many of my field names are one char longer.
- How does this affect the storage?
- Is there any compression or algorithm, that stores field names separatly or is really each field name stored within the BSON?
In my use case the collection there will have many small entries For each document there will be about 10 entities stored in mongodb. There will be about 1.000.000.000 documents, meaning at least 10.000.000.000 entities stored in collection.