Data types in MongoDB

Much data-types support to MongoDB whose list is given below:

String: The most commonly used data-type to store the data. String in MongoDB must be UTF-8 valid.
Integer:  Use to store a numerical value. Integer can be 32 bit or 64 bit depending upon your server.
Boolean: Use to store a Boolean (true/ false) value.
Double: Use to store floating-point values.
Symbol: This data-type is used identically to a string however, it's generally reserved for languages that use a specific symbol type.
Date: Use to store the current date or time in UNIX time format. You can specify your own date time by creating an object of Date and passing day, month, a year into it.
Object ID: Use to store the document’s ID.
Binary data: Use to store binary data.
Code: Use to store JavaScript code into the document.
Regular expression: Use to store regular expression
Min/ Max keys: This type is used to compare a value against the lowest and highest BSON elements.
Arrays: Use to store arrays or lists or multiple values into one key.
Timestamp: This can be handy for recording when a document has been modified or added.
Object: This data-type is used for embedded documents.
Null: This type is used to store a Null value.

No comments:

Post a Comment

Please do not enter any spam link in the comment box.

NUnit : Introduction

There are several unit test tools in the market, but one of them is NUnit, the most popular tool for doing unit testing. So in this tutorial...