ObjectId
The 12-byte Objectid consists of:
A 4-byte timestamp, representing the ObjectId's creation, measured in seconds since the Unix epoch.
A 5-byte random value generated once per process. This random value is unique to the machine and process
A 3-byte incremeting counter, initialized to a random value.
For timestamp and counter values, the most significant bytes appear first in byte sequence(big-endian). This is unlike other BSON values, where the least significant bytes appear first (little-endian).
BSON [bee · sahn], short for Binary JSON, is a binary-encoded serialization of JSON-like documents. Like JSON, BSON supports the embedding of documents and arrays within other documents and arrays. BSON also contains extensions that allow representation of data types that are not part of the JSON spec. For example, BSON has a Date type and a BinData type.
Last updated
Was this helpful?