From user-return-2162-apmail-couchdb-user-archive=couchdb.apache.org@couchdb.apache.org Wed Dec 17 00:49:49 2008 Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 21999 invoked from network); 17 Dec 2008 00:49:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Dec 2008 00:49:49 -0000 Received: (qmail 42365 invoked by uid 500); 17 Dec 2008 00:50:00 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 42331 invoked by uid 500); 17 Dec 2008 00:50:00 -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 42318 invoked by uid 99); 17 Dec 2008 00:50:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 16 Dec 2008 16:50:00 -0800 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 jan@prima.de designates 83.97.50.139 as permitted sender) Received: from [83.97.50.139] (HELO jan.prima.de) (83.97.50.139) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Dec 2008 00:49:45 +0000 Received: from [192.168.178.38] (e181224102.adsl.alicedsl.de [::ffff:85.181.224.102]) (AUTH: LOGIN jan, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by jan.prima.de with esmtp; Wed, 17 Dec 2008 00:49:24 +0000 Message-Id: From: Jan Lehnardt To: user@couchdb.apache.org In-Reply-To: <389be9770812161154r507c57b5ja6bfe298071d9731@mail.gmail.com> Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v929.2) Subject: Re: General Q about CouchDB Date: Wed, 17 Dec 2008 01:49:20 +0100 References: <389be9770812161146ldcbd435l32300db81573ebd0@mail.gmail.com> <389be9770812161154r507c57b5ja6bfe298071d9731@mail.gmail.com> X-Mailer: Apple Mail (2.929.2) X-Virus-Checked: Checked by ClamAV on apache.org On 16 Dec 2008, at 20:54, Christopher McComas wrote: > Chris, > Thanks. One question, concern I might have with that would be just > spelling > something differently, but that shouldn't be too big of an issue. > > To my next question, what would be the best way to structure > comments for a > blog post, where they have their own author, timestamp, and entry? > Again, > this is fairly straight-forward with a relational db using a foreign > key. Same concept ;) See http://www.cmlenz.net/archives/2007/10/couchdb-joins for details. Cheers Jan -- > > > Thanks, > > On Tue, Dec 16, 2008 at 2:51 PM, Chris Anderson > wrote: > >> On Tue, Dec 16, 2008 at 11:46 AM, Christopher McComas >> wrote: >>> Would it be wrong to try to do the category piece as related in >>> CouchDB? >>> What would be the best way to do it, so that you can have a page, >>> myblog.com/categories/this-category/ that'd then display all the >>> entries >> for >>> that category? What would be proper? >> >> Having a category field on the blog post itself is a fine way to do >> this. >> >> Eg: >> >> { >> "title":"Blah", >> "author":"Chris", >> "category":"music", >> "date": ... >> } >> >> Writing a view that sorts posts by category and date would be simple >> with this sort of data structure. Of course if you wanted to rename a >> category later you'd need to touch all the documents that listed it, >> so this solution is more like tagging than categories, but should >> fulfill the need. >> >> >> -- >> Chris Anderson >> http://jchris.mfdz.com >>