Introduction to MongoDBMongoDB简介

On this page本页内容

Welcome to the MongoDB 5.3 Manual! MongoDB is a document database designed for ease of development and scaling. 欢迎使用MongoDB 5.3手册!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中的关键概念,介绍了查询语言,并提供了操作和管理方面的注意事项和程序,以及一个全面的参考部分。

Warning警告
MongoDB 5.3 Release CandidatesMongoDB 5.3发布候选版本

MongoDB 5.3 release candidates are not yet available. MongoDB 5.3的候选版本尚未发布。This version of the manual is for an upcoming release and is currently a work in progress.此版本的手册即将发布,目前正在进行中。

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:使用文档的优点是:

  • Documents (i.e. objects) correspond to native data types in many programming languages.文档(即对象)对应于许多编程语言中的本机数据类型。
  • Embedded documents and arrays reduce need for expensive joins.嵌入式文档和数组减少了对昂贵连接的需求。
  • Dynamic schema supports fluent polymorphism.动态模式支持流畅的多态性。

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 support read and write operations (CRUD) as well as:MongoDB支持丰富的查询语言,以支持读写操作(CRUD)以及:

Tip提示
See also: 参阅:

High Availability高可用性

MongoDB's replication facility, called replica set, provides:MongoDB的复制功能称为副本集,它提供:

  • 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.副本集是一组维护相同数据集的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支持基于分片键创建数据区域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开发存储引擎。

←  What is MongoDB?Getting Started →