Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

CouchDB best practices - all entities in a single db vs a new db for each entity?

Tags:

couchdb

I am starting with CouchDB. What is the accepted best practice to utilize databases? A single database per application storing all kinds of entities with smth like "_type" property to discriminate one from another or a separate database for each kind of entity?

like image 578
artemb Avatar asked Jul 13 '10 12:07

artemb


People also ask

Is CouchDB a distributed database?

CouchDB is a peer-based distributed database system. It allows users and servers to access and update the same shared data while disconnected.

Is CouchDB scalable?

Scalability. The architectural design of CouchDB makes it extremely adaptable when partitioning databases and scaling data onto multiple nodes. CouchDB supports both horizontal partitioning and replication to create an easily managed solution for balancing both read and write loads during a database deployment.

Which of the following flag is used to pass data to Apache CouchDB When adding a document?

-o flag. Using this flag, cURL writes the output of the request to a file. The following example shows the use of -o flag of cURL utility. This gets the source code of the homepage of tutorialspoint.com, creates a file named example.com and saves the output in the file named example.

Is CouchDB document oriented?

Apache CouchDB is an open-source document-oriented NoSQL database, implemented in Erlang. CouchDB uses multiple formats and protocols to store, transfer, and process its data. It uses JSON to store data, JavaScript as its query language using MapReduce, and HTTP for an API.


1 Answers

One database with lots of different types of document, so you can take advantage of View Collation. Note that top-level names prefixed with an underscore, e.g. _type, are reserved for CouchDB.

like image 96
Matt Goodall Avatar answered Oct 01 '22 12:10

Matt Goodall