In our current project, so far, we have decided to store data in multiple
databases, for a matter of data segregation/tenant isolation. The idea
being that different organizations can use the product and have their own
private databases. All of those databases contain documents having the same
schema.
In practice though, users can have access to one or more of these databases.

On the client-side, users can select the databases that they want to see in
the user interface. Based on this selection, we interrogate the relevant
databases to fetch results.

In the case of list views, this is complex because we have to query
multiple databases and then regroup the result sets, sort the data and
apply pagination. Of course this is really cumbersome to do on the
client-side and we would prefer to be able to directly perform paginated
queries against n databases at the database server level.

Do you think that this is a reasonable approach? Do you have ideas that
could simplify our life while maintaining a good isolation between tenants
and allowing us to query data from different organizations depending on the
access rights of the connected user?

Also, are there any plans to incorporate a way to query multiple databases
(with pagination) directly through CouchDB?

kr,
Sébastien D.

Reply via email to