You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by "Ramanadham, Radhika" <ra...@emc.com> on 2014/03/24 15:29:47 UTC

Suggestion on couchDB DB and documents

So, here is my usecase-

I have multiple projects and their related test, requiremensts and results data that I need to store in couch DB.
I will need to create views to get some specific data out of the data based on projects.

So, I was wondering would be better-

1.       If should be creating one DB and have all projects stored as documents and distinguished by the project type or

2.       If I should create a database per project.

As I am still a newbie to couchdb, wanted some recommendations as to what would be a better design.

Could you'll suggest please?

Thanks,
Radhika

Re: Suggestion on couchDB DB and documents

Posted by Jens Alfke <je...@couchbase.com>.
On Mar 24, 2014, at 7:38 AM, Andy Dorman <ad...@ironicdesign.com> wrote:

> I am still very new to CouchDB but one thing that influenced our design was that you could not join results from multiple couch databases within CouchDB. Here is a link to a StackOverflow post about that.

Right. Just as in SQL, databases are entirely independent of each other for querying purposes.

Don’t be afraid of storing different types of data — different “tables”, to coin a phrase — in the same database. The usual convention is to use a property called “type” to distinguish types of documents. Then your views’ map functions can easily check the type to choose which documents to index.

—Jens

Re: Suggestion on couchDB DB and documents

Posted by Andy Dorman <ad...@ironicdesign.com>.
On 03/24/2014 09:29 AM, Ramanadham, Radhika wrote:
> So, here is my usecase-
>
> I have multiple projects and their related test, requiremensts and results data that I need to store in couch DB.
> I will need to create views to get some specific data out of the data based on projects.
>
> So, I was wondering would be better-
>
> 1.       If should be creating one DB and have all projects stored as documents and distinguished by the project type or
>
> 2.       If I should create a database per project.
>
> As I am still a newbie to couchdb, wanted some recommendations as to what would be a better design.
>
> Could you'll suggest please?
>
> Thanks,
> Radhika
>

I am still very new to CouchDB but one thing that influenced our design 
was that you could not join results from multiple couch databases within 
CouchDB.  Here is a link to a StackOverflow post about that.

http://stackoverflow.com/questions/4961337/joins-between-different-databases-in-couchdb


-- 
Andy Dorman