incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dirkjan Ochtman <dirk...@ochtman.nl>
Subject Re: Database design with CouchDB
Date Wed, 08 Dec 2010 14:36:15 GMT
On Wed, Dec 8, 2010 at 14:59, He Shiming <heshiming@gmail.com> wrote:
> Thanks again for clarifying. So this is one database per project, and
> inside this database, everything is flat document. Each user has one
> document.
>
> Now if each user has several blogs, each with several articles, do
> these information fit into the user document? Or do I create separate
> documents, with "type" field set to either "blog" or "article"?

I would create one document per blog, and one document per article,
with appropriate type-field values.

> Most apps are user-oriented. Everything is tied to a user. Does that
> mean everything related to this user fits into the user document? Will
> this approach introduce any difficulty later on?

Everything is tied to a user, but if it's manipulated separately (like
comments, forum posts, weblog articles), it should probably be a
separate document.

Cheers,

Dirkjan

Mime
View raw message