incubator-couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Davis <paul.joseph.da...@gmail.com>
Subject Re: Relational data
Date Fri, 13 Mar 2009 20:12:46 GMT
Dmitrii,

The two recommended ways would either be to store the display_name in
the comment or use multi-get to fetch all user docs at once.

HTH,
Paul Davis

On Fri, Mar 13, 2009 at 4:03 PM, Dmitrii Dimandt <dmitriid@gmail.com> wrote:
> Yeah, I know, I know, relational data was never meant to be in CouchDB, but
> still...
>
> What would be the best way to handle the following situation:
>
> news: url, text
> comments: news_url, text, user_login
> user: display_name, user_login
>
>
> So, when I show a news item with comments, it means that I need to do a
> round trip to CouchDB for every comment in order to retrieve the user's
> display name. Is there a better way to do it?
>

Mime
View raw message