介绍
Last updated
Was this helpful?
Last updated
Was this helpful?
MongoDB 是一个高性能,高可用,自动伸缩的开源数据库。
MongoDB的一行记录叫做一个文档(相当于MySQL的一行), 这个文档是一种键值结构,类似于JSON类型。这个键对应的值既可以是字符串,数组或者是其它文档(即文档的嵌套)。
使用文档类型(document)的优点如下:
文档这种类型在众多编程语言中比较贴近于原始数据
文档的嵌套可以减少合并(join)这种操作带来的昂贵开销
Dynamic schema supports fluent polymorphism
MongoDB 提供高性能的数据存储,尤其是:
支持嵌套的数据模型,减少IO操作带来的损耗
Indexes support faster queries and can include keys from embedded documents and arrays.
高可用的代表是MongoDB的副本集(replica set),提供:
自动故障转移
数据冗余(因为备份了数据,所以肯定会产生冗余)
副本集是一组维护者相同数据集的mongod进程,从而增加了数据的可用性(丢失概率小)
MongoDB把水平扩展(即分片)作为它的核心功能之一:
MongoDB支持以下的存储引擎:
另外,MongoDB还提供了可插拔的存储引擎API,允许第三方自己开发存储引擎
MongoDB 支持丰富的读写操作(),比如:
和( Geospatial Queries)
distributes data across a cluster of machines
Starting in 3.4, MongoDB supports creating of data based on the shard key. In a balanced cluster, MongoDB directs reads and writes covered by a zone only to those shards inside the zone. See the Zones manual page for more information
(including support for )
(MongoDB 4.0被移除)