Data type of MongoDB
Object ID: ID of the document
String: Strings, most commonly used, must be utf-8
Boolean: Boolean value, True or False
Integer: Integers
Double: Floating-point number
Arrays: Array or list, multiple values stored to a key
Object: Used to embed a document, i.e. a value of one document
NULL: Store null value
Timestamp: Time stamp
Date: Stores the current date or time in Unix time format
Object ID:
Each document has a property that guarantees the uniqueness of the document for _id;
You can set _id to insert the document yourself.
If you do not set it, MongoDB provides a unique _id for each document, which is a 12-byte hexadecimal number
The first 4 bytes are the current timestamp
The next 3 bytes are machine ID
The next 2 bytes for the service process ID of MONGO
The last 3 is a simple increment value
Data type of MongoDB