Database--mongodb

Source: Internet
Author: User

What ' s the MongoDB

MongoDB is a product between a relational database and a non-relational database, and is the most versatile and most like relational database in a non-relational database. The data structure he supports is very loose and is a JSON-like Bson format, so you can store more complex data types. MONGO's biggest feature is that the query language he supports is very powerful, and its syntax is a bit like an object-oriented query language that almost implements most of the functionality of a relational database single-table query, and also supports indexing of data. MongoDB has the advantage of ease-of-use, scalability, functionality, and superior performance.

Ease of Use:

MongoDB is a document-oriented (document-oriented) database, not a relational database.
The main purpose of the non-relational type is to obtain better extensibility. Of course there are other benefits, as compared to relational databases, document-oriented databases no longer have a "row" concept instead of a more flexible "document" model.
By embedding documents and arrays in a document, a document-oriented approach can use only one record to represent complex hierarchical relationships, which is consistent with modern object-oriented language developers ' views of the data.
In addition, there is no longer a pre-defined schema (predefined schema): The document's key (key) and the value (value) are no longer fixed types and sizes. Because there is no fixed pattern, it becomes easier to add or remove fields as needed. The development process is often accelerated because developers are able to iterate quickly. Moreover, experiments are easier to carry out. Developers can try a large number of data models, from choosing the best one.

Ease of scalability:

The size of the application dataset is growing at an incredible rate. With the increase in available bandwidth and the drop in memory prices, even a small-scale application, the amount of data that needs to be stored can be surprisingly large, even beyond
The processing power of many databases. T-level data, which has been very rare in the past, is now commonplace.
As the amount of data that needs to be stored continues to grow, developers face the problem of how to scale up the database into vertical scaling and scale-out, with vertical scaling being the least effort, but with the disadvantage that mainframes are generally expensive and
When the amount of data reaches the physical limits of the machine, it takes more money to buy a stronger machine, and it is more appropriate to choose horizontal scaling, but another problem with horizontal scaling is that there are too many machines to manage.
MongoDB is designed with scale-out. The document-oriented data model makes it easy to split data between multiple servers. MongoDB can automatically process data and load across clusters, automatically reassign documents, and route user requests to the correct machine. In this way, developers can focus on writing applications without having to think about how to scale them. If a cluster requires more capacity, simply adding a new server to the cluster MongoDB will automatically transfer the existing data to the new server.

Feature rich:

MongoDB, as a general-purpose database, provides a wide range of unique features beyond the ability to create, read, update, and delete data

    1. Index: Supports universal two-level indexes, allows multiple quick queries, and provides unique indexes, composite indexes, geospatial indexes, full-text indexes
    2. Aggregation: Supports converged pipelines, where users can create complex collections with simple fragments and automatically optimize through the database
    3. Special collection types: Supports collections of limited time, for data that will expire at some point, such as session sessions. Similarly, MongoDB supports fixed-size collections for storing recent data, such as logs
    4. File storage: Supports a very easy-to-use protocol for storing large files and file metadata. MongoDB does not have features that are common in relational databases, such as linking joins and complex multi-line transactions. Omitting these features is an architectural consideration, or for better extensibility, because these two functions are difficult to implement efficiently in a distributed system

Excellent performance:

One of the main objectives of MONGODB is to provide superior performance, which largely determines the design of MongoDB. MongoDB uses as much memory as cached cache, and the view automatically selects the correct index for each query. In short, all aspects of the design are designed to maintain its high performance although MongoDB is very powerful and tries to preserve many of the features of a relational database, it does not pursue all the features of a relational database. Whenever possible, the database server will hand over the processing logic to the client. This streamlined design is one of the reasons MongoDB can achieve such high performance.

Installation

Well, all of this is nonsense, and there's no need to look more. Then go to the topic.

Database--mongodb

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.