MongoDB data types

Documents in MongoDB are JSON-like objects. JSON is a simple representation of data. It supports the following data types:

  • null: The null data type is used to represent the null value as well as a value that does not exist:
  • boolean: The boolean type is used to represent true and false values:
  • number: In MongoDB, the shell default supports 64-bit floating-point numbers. To process long and integer numbers, MongoDB provides NumberLong and NumberInt, which represent 4 bytes and 8 bytes, respectively.
  • string: The string ...

Get Seven NoSQL Databases in a Week now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.