MongoDB (vii) MONGODB data type

Source: Internet
Author: User

MongoDB supports a list of many data types as given below:

    • String: This is the most commonly used data type to store data. The string in MongoDB must be a valid UTF-8.

    • Integer: This type is used to store a numeric value. The integer can be either 32-bit or 64-bit, depending on your server.

    • Boolean: This type is used to store a Boolean value (True/false).

    • Double: This type is used to store floating-point values.

    • Min/max keys: This type is used to compare the lowest and highest values of the Bson element.

    • Arrays: Use this type of array or list or multiple values to store to a key.

    • Timestamp: Timestamp. This makes it easy to record when the file has been modified or added.

    • Object: This data type is used for embedded files.

    • Null: This type is used to store a null value.

    • Symbol: This data type is used for the same string, but it is usually reserved for languages of a particular symbol type.

    • Date: This data type is used to store the UNIX time format for the current date or time. You can specify your own date and time, date and year, month, day to create an object.

    • Object ID: This data type is used to store the document ID.

    • Binary data: This data type is used to store binaries.

    • Code: This data type is used to store JavaScript code in the document.

    • Regular expression: This data type is used to store regular expressions

MongoDB (vii) MONGODB data type

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.