Getting started with MongoDB's Basic Data Types

Source: Internet
Author: User

Basic Data Types)

1. null

Can be used to indicate null and non-existent fields (field)

Eg: {"X",: NULL}

2. Boolean)

Like the Boolean Type in Java, there are only two values: 'true' or 'false'

Eg: {"X", true}

3. 32-bit integer (32-bit integer)

This type cannot be displayed in shell. Javascript only supports 64-bit floating point numbers. Therefore, 32 integer T is converted.

4. 64-bit integer

(Same as 3)

5. 64-bit floating point (64-bit floating point numbers)

All numbers in shell are of this type.

Eg: {"X", 3.14} is also allowed {"X": 3}

6. String (string type)

All UTF-8 characters can be represented in string type

Eg: {"X": "foobar "}

7. Symbol)

Shell does not support the symbol type. All symbols obtained from the database are converted to the string 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.