Comment

Comment by jd_mongodb

MongoDB actually doesn't store JSON. It stores a binary encoding of JSON called BSON (Binary JSON) which encodes type and size information.

This means we can encode objects in your program directly into objects in the database. It also means we can natively encode documents, sub-documents, arrays, geo-spatial coordinates, floats, ints and decimals. This is a primary function of the driver.

This also allows us to efficiently index these fields, even sub-documents and arrays.

All MongoDB collections are compressed on disk by default.

(I work for MongoDB)

parent jd_mongodb 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton