You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Brian Candler <B....@pobox.com> on 2009/10/02 09:29:41 UTC
Re: how to work on multiple databases
On Tue, Sep 22, 2009 at 07:51:00PM -0700, go canal wrote:
> Are there APIs available for working on multiple databases ?
I contributed a change to CouchRest which lets you do
Foo.on(database).whatever
which directs your request to a database dynamically.
I haven't tested this in a while - I found CouchRest too complex internally
so I ended up knocking together my own API (couchtiny). I published it on
github.com/candlerb, although it's subject to change at my own whim :-)
> let's say a user wants to display a list of his documents in all projects,
> how do we support this ? Do I have to issue one query command for each
> database then aggregate the result ?
Yes. For me it's a feature, rather than a bug, that couchdb databases are
completely isolated from each other. Maybe you should consider lumping
everything into one database.
Regards,
Brian.
Re: how to work on multiple databases
Posted by go canal <go...@yahoo.com>.
Yes. For me it's a feature, rather than a bug, that couchdb databases are
completely isolated from each other. Maybe you should consider lumping
everything into one database.
>> I can understand that couchdb DBs are completely isolated, I also agree that logically it is ok. But since there is no other layer we can use within a DB for modeling, I think operations on multiple databases are desired.
It does seem that putting something I need into one DB is the only way. Maybe it is acceptable since couchdb works incrementally, so performance won't be a problem even there is a large number of records because of combining multiple DBs into one ....
rgds,
canal