Introduction to MongoDB MongoDB简介

On this page 本页内容

Welcome to the MongoDB 4.4 Manual!欢迎使用MongoDB 4.4手册!MongoDB is a document database designed for ease of development and scaling.MongoDB是为便于开发和扩展而设计的文档数据库。The Manual introduces key concepts in MongoDB, presents the query language, and provides operational and administrative considerations and procedures as well as a comprehensive reference section.该手册介绍了MongoDB中的关键概念,介绍了查询语言,并提供了操作和管理注意事项和过程,以及全面的参考部分。

MongoDB offers both a Community and an Enterpriseversion of the database:MongoDB提供了数据库的社区版本和企业版本:

Document Database文档数据库

A record in MongoDB is a document, which is a data structure composed of field and value pairs.MongoDB中的记录是一个文档,它是由字段和值对组成的数据结构。MongoDB documents are similar to JSON objects.MongoDB文档类似于JSON对象。The values of fields may include other documents, arrays, and arrays of documents.字段的值可以包括其他文档、数组和文档数组。

A MongoDB document.

The advantages of using documents are:使用文档的优点是:

Collections/Views/On-Demand Materialized Views集合/视图/按需物化视图

MongoDB stores documents in collections.MongoDB将文档存储在集合中。Collections are analogous to tables in relational databases.集合类似于关系数据库中的表。

In addition to collections, MongoDB supports:除了集合,MongoDB还支持:

Key Features主要特点

High Performance高性能

MongoDB provides high performance data persistence.MongoDB提供了高性能的数据持久性。In particular,具体来说,

  • Support for embedded data models reduces I/O activity on database system.对嵌入式数据模型的支持减少了数据库系统上的I/O活动。
  • Indexes support faster queries and can include keys from embedded documents and arrays.索引支持更快的查询,并且可以包含来自嵌入文档和数组的键。

Rich Query Language丰富的查询语言

MongoDB supports a rich query language to supportMongoDB支持丰富的查询语言,以支持 read and write operations (CRUD)读写操作(CRUD)as well as:以及

See also另请参阅

High Availability高可用性

MongoDB’s replication facility, called replica set, provides:MongoDB的复制工具称为副本集,它提供:

  • automaticfailover自动故障
  • data redundancy.数据冗余。

A replica setis a group of MongoDB servers that maintain the same data set, providing redundancy and increasing data availability.副本集是一组维护相同数据集的MongoDB服务器,提供冗余并提高数据可用性。

Horizontal Scalability横向可扩展性

MongoDB provides horizontal scalability as part of its corefunctionality:MongoDB提供水平可扩展性作为其核心功能的一部分:

  • Sharding distributes data across a cluster of machines.分片将数据分布在一组机器上。
  • Starting in 3.4, MongoDB supports creating zones of data based on the shard key.从3.4开始,MongoDB支持基于shard key创建数据区域In a balanced cluster, MongoDB directs reads and writes covered by a zone only to those shards inside the zone.在平衡集群中,MongoDB只将区域覆盖的读写操作定向到该区域内的那些碎片。See the Zones manual page for more information.有关详细信息,请参阅区域手册页面。

Support for Multiple Storage Engines支持多个存储引擎

MongoDB supports multiple storage engines:MongoDB支持 多种存储引擎

In addition, MongoDB provides pluggable storage engine API that allows third parties to develop storage engines for MongoDB.此外,MongoDB还提供了可插拔的存储引擎API,允许第三方为MongoDB开发存储引擎。