MongoDB Introduction and basic knowledge

Source: Internet
Author: User
Tags mongodb

About MongoDB

First, Mongdb is a high-performance, open-source, modeless document-type NoSQL database.
Main Features:
1. File storage format Bson (an extension of JSON)
2. Schema free, the data format is not limited the structure of the table
3. Support Dynamic Query
4. Full index support
5. Support Replication (its master-slave replication) and recovery
6. Use efficient binary data storage, including large objects
7. Automatically process fragmentation to support scaling at the cloud level.
8. Support for Java, Ruby, Python, C + +, PHP and many other languages
9. Internal JavaScript support


Second, the advantages of MongoDB
1. Fast query speed
2. High concurrency. Can reach 20,000 concurrent.
3. High capacity. The amount of data that supports 10TB meaning

Iii. MongoDB Usage Scenarios
1. Website data
2. Caching
3. Large-size, low-value data
4. High-stretch scene
5. For objects and JSON data storage


Iv. the shortcomings of MongoDB
1. Data greater than 2.5G is not supported on 32-bit operating systems
2. Single File size limit 16M
3. Highly transactional systems
4. Traditional Business intelligence applications


V. MONGODB and other database differences

Compare items

Mongodb (non-relational)

MySQL, Oracle (relational type)

Database

Databases (database)

Databases (database)

Table

Collection (collection)

Two-dimensional tables (table)

Recording

Documents (document)

Records (record)

Field

Keys (key)

Columns (column)

Primary FOREIGN Key

No

Pk, FK

Flexible scalability

Extremely high

Poor

According to its description, the results of MongoDB can be broadly summarized as:

Vi. MongoDB Data types
The following table is a few of the data types commonly used in MongoDB.

Data Type Description
String String. Data types commonly used to store data. In MongoDB, the UTF-8 encoded string is legal.
Integer Integer value. Used to store numeric values. Depending on the server you are using, it can be divided into 32-bit or 64-bit.
Boolean Boolean value. Used to store Boolean values (True/false).
Double Double-precision floating-point value. Used to store floating-point values.
Min/max keys Compares a value to the lowest and highest value of a BSON (binary JSON) element.
Array Used to store an array or list or multiple values as a single key.
Timestamp Time stamp. Record when the document was modified or added.
Object Used for inline documents.
Null Used to create a null value.
Symbol Symbol. The data type is basically the same as the string type, but unlike it, it is typically used in languages with special symbol types.
Date Date time. Use the UNIX time format to store the current date or time. You can specify your own datetime: Create a Date object and pass in the month-date information.
Object ID The object ID. The ID used to create the document.
Binary Data Binary data. Used to store binary data.
Code The code type. Used to store JavaScript code in a document.
Regular expression The regular expression type. Used to store regular expressions.








MongoDB Introduction and basic knowledge

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.