MongoDB是一种强大、灵活、可拓展的数据存储方式。它扩展了关系型数据库等,吧啦吧啦一大堆废话,对于一门新的语言或者技术,了解技术背景是一方面,动手实练也是必不可少的。这里我打算发一些MongoDB从入门到项目应用的文章,也方便做些技术预言。将涉猎到MongoDB基础应用入门以及分布式部署等等方面。
一:从mongodb.org官网入手,了解MongoDB
Document Database
A record in MongoDB is a document, which is a data structure composed of field and value pairs. MongoDB documents are similar to JSON objects. The values of fields may include other documents, arrays, and arrays of documents.

A MongoDB document.
The advantages of using documents are:
- Documents (i.e. objects) correspond to native data types in many programming language.
- Embedded documents and arrays reduce need for expensive joins.
- Dynamic schema supports fluent polymorphism.
Key Features
High Performance
MongoDB provides high performance data persistence. In particular,
- Support for embedded data models reduces I/O activity on database system.
- Indexes support faster queries and can include keys from embedded documents and arrays.
High Availability
To provide high availability, MongoDB’s replication facility, called replica sets, provide:
- automatic failover.
- data redundancy.
A replica set is a group of MongoDB servers that maintain the same data set, providing redundancy and increasing data availability.
Automatic Scaling
MongoDB provides horizontal scalability as part of its core functionality.
- Automatic sharding distributes data across a cluster of machines.
- Replica sets can provide eventually-consistent reads for low-latency high throughput deployments.