Return-Path: Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: (qmail 46086 invoked from network); 24 Jun 2010 01:50:20 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 24 Jun 2010 01:50:20 -0000 Received: (qmail 9687 invoked by uid 500); 24 Jun 2010 01:50:19 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 9633 invoked by uid 500); 24 Jun 2010 01:50:18 -0000 Mailing-List: contact user-help@cassandra.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@cassandra.apache.org Delivered-To: mailing list user@cassandra.apache.org Received: (qmail 9625 invoked by uid 99); 24 Jun 2010 01:50:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jun 2010 01:50:18 +0000 X-ASF-Spam-Status: No, hits=4.3 required=10.0 tests=AWL,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of sahmed1020@gmail.com designates 74.125.82.44 as permitted sender) Received: from [74.125.82.44] (HELO mail-ww0-f44.google.com) (74.125.82.44) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 24 Jun 2010 01:50:11 +0000 Received: by wwb22 with SMTP id 22so180949wwb.31 for ; Wed, 23 Jun 2010 18:49:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type; bh=osRCqa5bC4D0A5F3dM2uSKNukAFlCqnGyuprSutgXE8=; b=Pdv9wUhkiRFaSEB5ZZUDSoNrn5kjrcrkAlOlrYsDecvlNWLlR/WXVc9rIoin8QfZ9C xGGcCGgGh4YxOkYbqV9JrB0ljKSDx/oJTGRWOEgN0EgGrdm4rqc3IXbo6bMy7ZbtKyO7 RWkCejMS+cbQqcfizLzAjuNW7L9E8h9SLmHV0= 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; b=dWu+yUIVKQA291GhjlRyhxY5Y/Y4EuzyABUkYCaNxN0KMTg92b0MV/Wz4ZZg5R68p3 QiugYUApo2KypP+UQNKsOxXgj7cRuYB2i7SVE13XMwjpjv9i+AJoNn3BWmr7b46IDpkR tYNtF5EHjO6cbYIdY1LfKYa386WbNUKKaqslM= MIME-Version: 1.0 Received: by 10.216.87.142 with SMTP id y14mr3208201wee.96.1277344186032; Wed, 23 Jun 2010 18:49:46 -0700 (PDT) Received: by 10.216.0.71 with HTTP; Wed, 23 Jun 2010 18:49:45 -0700 (PDT) In-Reply-To: References: Date: Wed, 23 Jun 2010 21:49:45 -0400 Message-ID: Subject: Re: forum application data model conversion From: S Ahmed To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=0016e6d77cc876e3ce0489bcde5f --0016e6d77cc876e3ce0489bcde5f Content-Type: text/plain; charset=ISO-8859-1 Any thoughts? On Tue, Jun 22, 2010 at 2:13 PM, S Ahmed wrote: > Converting a Forum application to cassandra's data model. > > Tables: > > Posts [postID, threadID, userID, subject, body, created, lastmodified] > > So this table contains the actual question subject and body. > > When a user logs in, they want to see a list of their questions, and also > order by the last-modified date (to see if people responed to their > question). > > How would you do this best in Cassandra, seeing as the question/answer text > is stored in another table. > > I know you could make a CF like: > > userID { postID1, postID2, ...} > > And somehow order by last-modified, but then on the actual web page you > would have to first query for postID's owned by the user, and orderd by > last-modified. > > THEN you would have to fetch the post data from the posts collection. > > Is this the only way? I mean other than repeating the post subject+body in > the user-to-postID index CF. > > > --0016e6d77cc876e3ce0489bcde5f Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Any thoughts?

On Tue, Jun 22, 2010 at 2:1= 3 PM, S Ahmed <sahmed1020@gmail.com> wrote:
Converting a Forum application to cassandra's data model.

Tables= :

Posts [postID, threadID, userID, subject, body, created, lastmodif= ied]

So this table contains the actual question subject and body.
When a user logs in, they want to see a list of their questions, and al= so order by the last-modified date (to see if people responed to their ques= tion).

How would you do this best in Cassandra, seeing as the questi= on/answer text is stored in another table.

I know you could make a CF like:

userID { postID1, postID2, ...}=

And somehow order by last-modified, but then on the actual web page= you would have to first query for postID's owned by the user, and orde= rd by last-modified.

THEN you would have to fetch the post data from the posts collection.
Is this the only way?=A0 I mean other than repeating the post subject= +body in the user-to-postID index CF.



--0016e6d77cc876e3ce0489bcde5f--