Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 75322 invoked from network); 13 Mar 2009 20:13:20 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 13 Mar 2009 20:13:20 -0000 Received: (qmail 36429 invoked by uid 500); 13 Mar 2009 20:13:15 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 36400 invoked by uid 500); 13 Mar 2009 20:13:15 -0000 Mailing-List: contact user-help@couchdb.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@couchdb.apache.org Delivered-To: mailing list user@couchdb.apache.org Received: (qmail 36382 invoked by uid 99); 13 Mar 2009 20:13:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2009 13:13:15 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of paul.joseph.davis@gmail.com designates 74.125.44.29 as permitted sender) Received: from [74.125.44.29] (HELO yx-out-2324.google.com) (74.125.44.29) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 13 Mar 2009 20:13:07 +0000 Received: by yx-out-2324.google.com with SMTP id 31so1054755yxl.5 for ; Fri, 13 Mar 2009 13:12:46 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=BUd6LGvt/FRznoaGvR56a0Y1CtkHO69M+3pkwEaos1M=; b=D3PIZUH8JOQyAMdXI1jU0jha3J3jhtIO+e/MoE3LnSFYSuHddW5a77z9/txpf5ysuH 7N3Zc2+rbJAPfiQ5z/MEZ2corSuVPf+sIS7ssuSFu8CJPpfM1ge3vGHYsSsE1NSFoB1i 2JGe6ItsqdWqNM3FELzePqzfJ7qOv/JdguKmI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=hIVxnwJKwybLpC/0vUuhSAd8K/kWQzIQNQSli68UNq902082cONcVYGux4Ok1/iv+X nQdjJXZ359hbdEnaylL4Z3NRW0prDuC/sSRm/kttrhizwPLDizWfbgAdp7/aVVtcdqQw pkJNuZB/k+QPVSNpj/S9BDtuwOXKjnRvIhyK4= MIME-Version: 1.0 Received: by 10.100.125.12 with SMTP id x12mr1171596anc.111.1236975166395; Fri, 13 Mar 2009 13:12:46 -0700 (PDT) In-Reply-To: <99604707-9FBB-4C67-A408-A1046CDD6BBF@gmail.com> References: <99604707-9FBB-4C67-A408-A1046CDD6BBF@gmail.com> Date: Fri, 13 Mar 2009 16:12:46 -0400 Message-ID: Subject: Re: Relational data From: Paul Davis To: user@couchdb.apache.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org 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 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? >