📜  CouchDB与MongoDB

📅  最后修改于: 2020-11-23 08:59:49             🧑  作者: Mango

CouchDB与MongoDB

Comparison Feature CouchDB MongoDB
Data Model It follows the document-oriented model and data is presented in JSON format. It follows the document-oriented model but data is presented in BSON format.
Interface CouchDB uses HTTP/REST based interface. It is very intuitive and very well designed. MongoDB uses binary protocol and custom protocol over TCP/IP.
Object Storage In CouchDB, database contains documents. In MongoDB, database contains collections and collection contains documents.
Query Method CouchDB follows Map/Reduce query method. (JavaScript+others) MongoDB follows Map/Reduce (JavaScript) creating collection + object-based query language.
Replication CouchDB supports master-master replication with custom conflict resolution functions. MongoDB supports master-slave replication.
Concurrency It follows MVCC (Multi Version Concurrency Control). Update in-place.
Preferences CouchDB favors availability. MongoDB favors consistency.
Performance Consistency In CouchDB is safer than MongoDB In MongoDB, database contains collections and collection contains documents.
Consistency CouchDB is eventually consistent. MongoDB is strongly consistent.
Written in it is written in Erlang. it is written in C++.