Skip to main content

Data Types

Booleans

Numbers

TypeDescription
int32-bit signed integer
double64-bit floating point
long64-bit unsigned integer
decimal128-bit floating point

Strings

ObjectId

TypeDescription
ObjectIdUnique value of 12 bytes

The first 4 bytes represent the timestamp, 5 bytes to represent random value, and 3 bytes to represent an incremental counter.

Binary Data

Objects (Nested documents)

info

A MongoDB BSON document supports nesting up to 100 levels.

caution

Performance and memory consumption issues arise when the number of nesting levels increases.