Traditional Culture Encyclopedia - Traditional festivals - What is the usage scenario of mongodb?

What is the usage scenario of mongodb?

Usage scenario:

(1) Website data: MongoDB is suitable for real-time insertion, update and query, and has the replication and high scalability required for real-time data storage of websites.

(2) Cache: Because of its high performance, MongoDB is also suitable as the cache layer of information infrastructure. After the system restarts, the persistent cache layer built by MongoDB can avoid overloading the lower data sources.

(3) Large amount of data and low value data.

(4) High scalability scenario: MongoDB is suitable for databases composed of dozens or hundreds of servers.

(5) Used for the storage of objects and JSON data: MongoDB's BSON data format is suitable for the storage and query in documented format.

Mongodb design features:

(1) is oriented to set storage and easy to store data of object types. In MongoDB, data is grouped and stored in collections, which is similar to tables in RDBMS. An unlimited number of documents can be stored in a collection.

(2) Patterns are free and stored in a modeless structure. The data stored by collections in MongoDB is a modeless document, and an important feature of collections different from tables in RDBMS is that they store data without schema.

(3) Full indexing is supported, and indexes can be established on any attribute, including internal objects. The index of MongoDB is basically the same as that of RDBMS. You can create indexes on the specified attributes and internal objects to improve the query speed. In addition, MongoDB provides the ability to create geospatial-based indexes.

(4) Support query. MongoDB supports rich query operations, and MongoDB supports almost most queries in SQL.

(5) Powerful aggregation tools. In addition to providing rich query functions, MongoDB also provides powerful aggregation tools, such as count and group, which support the use of MapReduce to complete complex aggregation tasks.