mongodb-database of non-relational type

Source: Internet
Author: User
Tags failover

Introduction to 1.mongodb

MongoDB (http://www.mongodb.org/) is a high performance, open source (the generation of Earthquake army Daniel is studying MongoDB source code, we can go to see http://www.cnblogs.com/daizhj/), Mode Freedom ( Schema-free) is a document-based database that can be used in many scenarios to replace traditional relational databases or key/value (Key-value) storage methods. MongoDB uses C + + development,

2. What are his characteristics?

(The official language is Baidu income)

    • Collection-oriented storage: suitable for storing objects and data in JSON form.
    • Dynamic query: MongoDB supports rich query expressions. Query directives use a JSON-style tag to easily query objects and arrays embedded in the document.
    • Full index support: Includes embedded objects and arrays in the document. The query optimizer of MongoDB parses the query expression and generates an efficient query plan.
    • Query monitoring: MongoDB contains a monitoring tool to analyze the performance of database operations.
    • Replication and automatic failover: The MongoDB database supports data replication between servers, supporting master-slave mode and inter-server replication. The primary goal of replication is to provide redundancy and automatic failover.
    • Efficient traditional storage: supports binary data and large objects such as photos or pictures.
    • Automatic sharding to support cloud-level scalability (in the early alpha phase): Automatic sharding supports a level of database clustering, adding additional machines dynamically. Mode Freedom (schema-free) means that for files stored in a MongoDB database, we do not need to know any of its structure definitions. If necessary, you can store files of different structures in the same database.
    • Drivers for Python,php,ruby,java,c,c#,javascript,perl and C + + languages are supported, and drivers for Erlang and. NET platforms are also available in the community.

3. What are the suitable occasions for use?

    • Website data: MongoDB is ideal for real-time insertions, updates and queries, as well as the replication and high scalability required for real-time data storage on the site. Caching: Because of its high performance, MongoDB is also suitable as a caching layer for the information infrastructure. After the system restarts, the persistent cache layer built by MongoDB avoids overloading the underlying data sources.

    • Large, low-value data: Storing some data in a traditional relational database can be expensive, and many times programmers often choose traditional files for storage.

    • Highly scalable scenario: MongoDB is ideal for databases consisting of dozens of or hundreds of servers. MongoDB's roadmap already includes built-in support for the MapReduce engine.

    • Storage for objects and JSON data: MongoDB's Bson data format is ideal for storing and querying in a document format. The so-called "set-oriented" (collenction-orented), meaning that data is grouped in a dataset, is called a collection (collenction). Each collection has a unique identifying name in the database and can contain an unlimited number of documents. The concept of a collection is similar to a table in a relational database (RDBMS), unlike it does not need to define any schema (schema).

4.mongodb syntax summary vs. mysql

Advantages of the 5.MONGODB database

Fast! (Of course, this is related to the specific application, usually, it is about 5 bits faster than the general relational database.) )
High Scalability – Petabytes of storage are easy to achieve (but maybe we don't need petabytes of storage, 10TB may be enough)
He has a good replication mode (replica sets)
Has a very well-developed Java API
His storage format is JSON, which is very good for Java, and for Javascirpt.
It's very handy to be operational and you don't have to have an administrator assigned to it.
It has a very active community (a bug I'm proposing can be fixed within 20 minutes.) Thanks Elliot)
His version control is very clear.

Mongodb-a non-relational database

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.