MongoDB Brief Introduction to MongoDB five major features _mongodb

Source: Internet
Author: User
Tags mongodb

MongoDB is a powerful, flexible, scalable way to store data. It expands the many useful features of relational databases, such as secondary indexes, range queries, and sorting. MongoDB is rich in functionality, such as built-in support for MapReduce aggregation, and support for geo-spatial indexing.

1.1 Rich data models

MongoDB is a document-oriented database, not a relational database. The main reason for abandoning a relational model is to achieve more convenient extensibility and other benefits.

The basic idea is to translate the idea of "row" into a more flexible "document" model. Document-oriented approach can be embedded in a document or array, so you can represent a very complex hierarchical relationship with a single record.

MongoDB does not have a pattern: The document's keys are not defined in advance and will not be fixed. Because there is no pattern to change, there is usually no need to migrate a large amount of data, no more than putting all the data in a mold, the application layer can handle new or missing keys

1.2 Easy to expand

The size of the application dataset grows fast. The development of sensor technology, the increase of bandwidth, and the popularization of Internet handheld devices make it difficult to store large amount of data in the present even small application. Databases at the T level are commonplace.

As the data that developers want to store grows, they face a choice: Upgrade the database (buy a better server),
or expand the database (spread the data to a lot of machines). It's usually the most energy-saving way to upgrade your database, but it's expensive.

But expansion is not only economical but also can continue to increase: Want to increase storage space or improve performance, only need to buy a common server to join in the cluster.

MongoDB's initial design considered the problem of scaling, and the document-oriented data model enabled it to automatically split data across multiple servers. It can also balance the data and load of the cluster and automatically rearrange the document. So developers can focus on writing applications, Rather than thinking about how to expand. If you need more capacity, just add new machines to the cluster and let the database handle the rest.

1.3 Rich Features

A) index

MongoDB supports common auxiliary indexes, enables multiple quick queries, and provides unique, composite, and geo-spatial indexing capabilities

b Storage JavaScript

Developers do not have to use stored procedures to access JavaScript functions directly on the server side, values

c) Aggregation

MongoDB supports MapReduce and other aggregation tools

d) Fixed Set

The size of the collection is capped, which is especially useful for certain types of data, such as logs

e) file storage

MongoDB supports storing metadata for large files and files in a protocol that is easy to use

Some of the common features of relational databases are MongoDB, such as join and complex multiline transactions.

This architecture is designed to improve scalability because these two features are hard to implement on a distributed system.

1.4 High Performance

MongoDB uses the MONGODB transport protocol as the primary way to interact with the server (the corresponding protocol requires more overhead, such as: Http/rest).

It dynamically fills the document, allocates data files, and uses space for stable performance. Memory-mapped files are used in the default storage engine to work with memory management

To the operating system to process. The dynamic query optimizer "remembers" the most efficient way to execute a query.

Although MongoDB is powerful, try to maintain the many features of a relational database, as much as possible to give the server processing logic to the client (either by the driver or by the user's application). This streamlined design is mongodb to achieve very good performance.

1.5 Easy to manage

MongoDB as much as possible to allow server autonomy to simplify the management of the database, processing to start the database server, there is little necessary management operations. If the primary server is hung up, MongoDB automatically switches to the backup server and upgrades the backup server to a active server. In a distributed environment, Clusters are automatically integrated and configured with new nodes only if they are aware of new nodes.

MongoDB's management philosophy is to let the server automatically configure as much as possible, so that users adjust the settings when needed.

MongoDB's vision is a better interpretation of itself-building a flexible, efficient, scalable, full-featured 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.