top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

Compare MongoDB and CouchDB at high level? What is CouchDB?

+2 votes
361 views

What is CouchDB ? and which one is better mongodb or couchdb please explain with example.

posted Mar 13, 2016 by Shivam Kumar Pandey

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

CouchDB (V1.2)

Written in: Erlang
Main point: DB consistency, ease of use
License: Apache
Protocol: HTTP/REST
Bi-directional (!) replication,
continuous or ad-hoc,
with conflict detection,
thus, master-master replication. (!)
MVCC - write operations do not block reads
Previous versions of documents are available
Crash-only (reliable) design
Needs compacting from time to time
Views: embedded map/reduce
Formatting views: lists & shows
Server-side document validation possible
Authentication possible
Real-time updates via '_changes' (!)
Attachment handling
thus, CouchApps (standalone js apps)

Best used:

For accumulating, occasionally changing data, on which pre-defined queries are to be run. Places where versioning is important.

For example:

CRM, CMS systems. Master-master replication is an especially interesting feature, allowing easy multi-site deployments.

MongoDB (3.2)

Written in: C++
Main point: JSON document store
License: AGPL (Drivers: Apache)
Protocol: Custom, binary (BSON)
Master/slave replication (auto failover with replica sets)
Sharding built-in
Queries are javascript expressions
Run arbitrary javascript functions server-side
Geospatial queries
Multiple storage engines with different performance characteristics
Performance over features
Document validation
Journaling
Powerful aggregation framework
On 32bit systems, limited to ~2.5Gb
Text search integrated
GridFS to store big data + metadata (not actually an FS)
Has geospatial indexing
Data center aware

Best used:

If you need dynamic queries. If you prefer to define indexes, not map/reduce functions. If you need good performance on a big DB. If you wanted CouchDB, but your data changes too much, filling up disks.

For example:

For most things that you would do with MySQL or PostgreSQL, but having predefined columns really holds you back.

answer Sep 27, 2016 by Manikandan J
Similar Questions
+1 vote

We are using php, mongodb v 2.6.10, we have not set connection pool. We want to set connection pool at server level.
Presently we are creating a new connections every time, when application talk to database. When our no of connection reach to 400, our db performance impact so badly, and query time increase up to 4 times.

+2 votes

Is there a way to compare two fields from different MongoDB Collections?

I have a 2 collections:
collection_1: { "english" : { "orth" : "africa", "pron" : "frik" }, "francais" : { "orth" : "afrique" } }
collection_2: { "form" : { "orth" : "afrique", "pron" : "afik" } "sense" : { "cit" : { "quote" : "africa" } }}

I would like to find all where "collection_1.english.orth" == "collection_2.form.orth" and copy/add "form.pron" from collection_2 into collection_1 under "francais.pron".

...