I'm modelling a document generation system in couchdb. It semi-automates the production of proposal and presentation documents from managable document fragments.
Much like, say, Basecamp, it breaks down very simply into self-contained data per 'account'. Each account has multiple users, projects, documents, etc. However, nothing should be shared between accounts.
I can see two ways of doing this:
- one couchdb database per account
- use a namespace / property to identify the account
It seems to me that the first approach is conceptually sound and potentially has security and partitioning advantages. However, it seems to me to restrict some cross-database data querying (that I don't have a use case for now but you never know...) and to make updating views potentially require an awful lot of writes.
Does anyone experienced with this kind of decision have any advice?