Return-Path: Delivered-To: apmail-couchdb-user-archive@www.apache.org Received: (qmail 54384 invoked from network); 17 Dec 2008 07:37:46 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 17 Dec 2008 07:37:46 -0000 Received: (qmail 35834 invoked by uid 500); 17 Dec 2008 07:37:56 -0000 Delivered-To: apmail-couchdb-user-archive@couchdb.apache.org Received: (qmail 35806 invoked by uid 500); 17 Dec 2008 07:37:56 -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 35764 invoked by uid 99); 17 Dec 2008 07:37:55 -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 23:37:55 -0800 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of metalelf0@gmail.com designates 74.125.46.30 as permitted sender) Received: from [74.125.46.30] (HELO yw-out-2324.google.com) (74.125.46.30) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Dec 2008 07:37:39 +0000 Received: by yw-out-2324.google.com with SMTP id 3so1409202ywj.5 for ; Tue, 16 Dec 2008 23:37:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender :to:subject:in-reply-to:mime-version:content-type:references :x-google-sender-auth; bh=CYCKiBudyCh0sITEKp4CthxFq8T4gKJIYHGTolmxEaA=; b=eJ/bl3iqlUUsmhNQk+lwkHo8EtxLel6dXyyqDyILBIrXSh1aLXtKGLj+7iXwaeU4yE uAPrbhOyn3QOLE4F/sNA0J/7Rpzo+MAxx4utz/yhBhUNpmmiRuGzyIrYKulErlR+nCiG Onc13q/AVvA2YOe0Aq5IR38Js7nOmlh1FLL+o= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version :content-type:references:x-google-sender-auth; b=jVYpVILt011bKu0JtIpv4sj0WyZlKt8wNA2MO2AGZKQtqtD/Y5QrazXNSSwOxO90XK lBQ7id80pJiC8ilJwcx1cAVt2C0TJsPI4072xixQST5dYpOi1cye+aEBMCMW3FY+DABN BjEM957OU8TxWbTAkrIOeIWHKmyzL8kXPuZkE= Received: by 10.90.120.14 with SMTP id s14mr200363agc.20.1229499437980; Tue, 16 Dec 2008 23:37:17 -0800 (PST) Received: by 10.90.114.3 with HTTP; Tue, 16 Dec 2008 23:37:17 -0800 (PST) Message-ID: <7d8fb2e90812162337o3d08430dwc09af6d73e662d95@mail.gmail.com> Date: Wed, 17 Dec 2008 08:37:17 +0100 From: "Andrea Schiavini" Sender: metalelf0@gmail.com To: user@couchdb.apache.org Subject: Re: General Q about CouchDB In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_2452_19096077.1229499437977" References: <389be9770812161146ldcbd435l32300db81573ebd0@mail.gmail.com> <389be9770812161154r507c57b5ja6bfe298071d9731@mail.gmail.com> X-Google-Sender-Auth: 7f6999504e00fd8b X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_2452_19096077.1229499437977 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline In the second approach described in this article, posts are separated from comments. But isn't this in contrast with the impossibility of CouchDB to update atomically several documents? It could lead to a loss of database integrity, if in example an user deletes an article while another one updates a related comment. Shouldn't it be encouraged to keep related informations in the same document? Andrea Schiavini 2008/12/17 Jan Lehnardt > > 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 >>> >>> > ------=_Part_2452_19096077.1229499437977--