MongoDB helps many datatypes. Some of them are −
- String − This is the most usually used datatype to store the statistics. String in MongoDB should be UTF-eight valid.
- Integer − This type is used to store a numerical value. Integer may be 32 bit or sixty four bit relying upon your server.
- Boolean − This type is used to save a boolean (true/ fake) cost.
- Double − This kind is used to store floating factor values.
- Min/ Max keys − This type is used to evaluate a fee against the bottom and highest BSON elements.
- Arrays − This kind is used to save arrays or list or more than one values into one key.
- Timestamp − ctimestamp. This may be available for recording whilst a document has been modified or added.
- Object − This datatype is used for embedded documents.
- Null − This kind is used to shop a Null fee.
- Symbol − This datatype is used identically to a string; however, it is typically reserved for languages that use a particular image kind.
- Date − This datatype is used to shop the modern-day date or time in UNIX time layout. You can specify your personal date time by way of creating item of Date and passing day, month, 12 months into it.
- Object ID − This datatype is used to keep the file’s ID.
- Binary information − This datatype is used to shop binary facts.
- Code − This datatype is used to store JavaScript code into the record.
- Regular expression − This datatype is used to store ordinary expression.