From the course: MongoDB Essential Training

The document model

- [Instructor] One of the main features that differentiates MongoDB from many of the databases is that it is built to natively work with JSON documents. If your application uses JSON to work with data, using MongoDB can save you a lot of time because you can store data as is. Here's an example JSON document. The document has multiple key value pairs where the keys define the data and must be strings, and the values are the variables for the respective record that contain the data. For the values, you can use strings, numbers, booleans, arrays, other JSON objects, and some other objects. You'll hear a lot about JSON when talking about MongoDB, and most of the time, you don't need to think about this any further. However, there's one small caveat you should know about. MongoDB actually uses a binary encoded serialization of JSON-like documents called BSON for storing data as well as for their drivers and tools. BSON was designed to be especially lightweight, traversable, and efficient. BSON also brings support for additional types such as images, timestamps, and longs, and much more. You generally won't need to think about the difference between JSON and BSON much, but it's good to know that there is a slight difference.

Contents