Skip to main content


Showing posts from April, 2015

Data types in MongoDB

Many data-types support to MongoDB whose list is given below:
String :  Most common 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 object of Date and passing day, month, 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 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 list or multiple values in…