Learning mongodb--(1): About MongoDB

Source: Internet
Author: User
Tags mongodb

Thanks a lot, http://blog.csdn.net/drifterj/article/details/7814536.


As the application needs to deal with the exponential expansion of data volume and analyze the expansion of this massive data demand, the relational database is gradually showing a fatigue state. When the system is scaled horizontally, the relational database often becomes the bottleneck of performance improvement. At this point, NoSQL technology became the initiator and winner of the change. MongoDB is the most powerful one of these. MongoDB is ideal for Internet applications with large data volumes, high concurrency, and weak transactions, and its built-in horizontal scaling mechanism provides the ability to handle data volumes from millions to 1 billion levels. This ensures that MONGODB applications are used, and the database side does not become a constraint bottleneck in later expansions.

The above is considered as the beginning of self-study MongoDB start small remember it. I began to study MongoDB completely out of interest, the selected books for the "MongoDB authoritative guide", the first time to blog to learn a technology is because you want to leave more traces in the process of learning, so that the latter have the opportunity to reflect on the actual combat. I will be a chapter to learn, synchronized chapter-by-section blog record, I hope to finally have a harvest. Let's go.

工欲善其事, its prerequisite, learn a technology first must download the relevant package and source code, I downloaded 2.0.6 version, and upload to their own resources. The first chapter of this book is a brief introduction to MongoDB.

MongoDB is a document-oriented database, not the most commonly used relational database, the reason for abandoning the relational model is to obtain more convenient extension, stable fault-tolerant features. The basic idea of document-oriented is to replace the concept of "line" in the relational model with the "document" model. The document-oriented approach allows you to embed documents and arrays inline, so you can actually use a single piece of data to represent very complex structures, which is very much in line with how the object-oriented language treats data.

MongoDB has no schema: The document's keys are not defined in advance and are not fixed. Because there is no pattern to change, it is usually not necessary to migrate large amounts of data. Instead of putting all the data into one mold, the application layer can handle new or missing keys. This makes it very easy for developers to change the data model.

In practice, as the number of user groups grows and applications increase, the system inevitably needs to be extended, usually expanding, including vertical expansion and scale-out. Vertical expansion is a simple way, the application will not have any impact, is to improve the performance of a single server, such as 2 core to 4 cores, 8G memory up to 16G memory, etc., but this expansion method is limited, to achieve the physical limit of hardware can not go on, for small and medium-sized applications is acceptable. Scale-out is the way to increase the overall performance of your application by increasing the number of servers, enabling unlimited scaling. However, this kind of extension to the entire application and maintenance will put forward higher requirements, the application itself needs to support scale-out, the server cluster also needs to support load balancing, and so on, the stability of the system also need more control, this is suitable for large-scale application expansion mode.

In scale-out, the relational database section is also a difficult one, and the relational database does not natively support cross-scaling, and if you must do this by classifying the tables separately, only a large amount of additional code support is required at the DAO layer. MongoDB considers the problem of scaling in its initial design, and the document-oriented data model automatically splits data across multiple servers. It can also balance the data and load of the cluster, automatically rearrange the documents. Developers do not have to consider the scale of the database hierarchy problem, need to expand the database, add machines in the cluster, MongoDB will automatically handle the following things.

MongoDB has a variety of features, but in order to achieve this, he also abandons certain functions of relational databases such as table join joins and complex multiline transactions. Because these two functions are inherently difficult to implement on a distributed system.

MongoDB tries to make the server autonomous to simplify the management of the database. In addition to starting the database server, there is little administrative action necessary. If the primary server is hung, MongoDB automatically switches to the backup server, and the backup server is promoted to an active server. In a distributed environment, the new node is automatically integrated and configured as soon as the new node is known to be added to the cluster.

MongoDB's management philosophy is to have the server automatically configured whenever possible, allowing users to adjust settings when needed.

Finally give everyone a MongoDB URL, if you want to see other information about the project, you can refer to: Http://www.mongodb.org/display/DOCS/Home

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.