Return-Path: X-Original-To: apmail-cassandra-user-archive@www.apache.org Delivered-To: apmail-cassandra-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D8245D6FC for ; Thu, 13 Sep 2012 17:59:38 +0000 (UTC) Received: (qmail 36977 invoked by uid 500); 13 Sep 2012 17:59:36 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 36952 invoked by uid 500); 13 Sep 2012 17:59:36 -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 36944 invoked by uid 99); 13 Sep 2012 17:59:36 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2012 17:59:36 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FSL_RCVD_USER,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of cse.soumya@gmail.com designates 209.85.217.172 as permitted sender) Received: from [209.85.217.172] (HELO mail-lb0-f172.google.com) (209.85.217.172) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Sep 2012 17:59:28 +0000 Received: by lbky2 with SMTP id y2so2324280lbk.31 for ; Thu, 13 Sep 2012 10:59:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=akyOFEU+HZFVlJqi+ajBZxbXGCIKBduXjrNzFLQ+wHI=; b=hvXIMKzwJJgkrXG2Twlof22nVQBf56TMYAAE6RVVZYrMfpskNzM4oEguK9aC+jkNs7 RwuMSWjtWTt5J5KxwipyuYLsOpcrRO9SDnzPELJ7lQKm7292RfJQ2El/BNBVAwOkWxTZ hR9z3do6Tqt/YqXzVFmgQ62el6kWZbAq7eFee7MdtG1ArjC+Tfw4rI4CW69iCwuJQ2Y5 d5nEW/4CFg0bC6TxzyHYgwZjppLfyjiGGtqSke8+V5G1WYPpotx8pPAo9pD1/xwAIvL3 Yh2X5JCevWDW+EnEe1zL7kibfLR9zCErzFgi/Ycg7Ncw+/iANdsMvvCgV+sK8EosG7wF jg6w== MIME-Version: 1.0 Received: by 10.112.88.73 with SMTP id be9mr185981lbb.72.1347559147952; Thu, 13 Sep 2012 10:59:07 -0700 (PDT) Received: by 10.114.24.166 with HTTP; Thu, 13 Sep 2012 10:59:07 -0700 (PDT) In-Reply-To: References: Date: Thu, 13 Sep 2012 10:59:07 -0700 Message-ID: Subject: Re: Data Model From: Soumya Acharya To: user@cassandra.apache.org Content-Type: multipart/alternative; boundary=f46d0401697f53daa304c9991042 --f46d0401697f53daa304c9991042 Content-Type: text/plain; charset=ISO-8859-1 I just started learning Cassandra any suggestion where to start with ?? Thanks Soumya On Thu, Sep 13, 2012 at 10:54 AM, Roshni Rajagopal < roshni_rajagopal@hotmail.com> wrote: > I want to learn how we can model a mix of static and dynamic columns in > a family. > > Consider a course_students col family which gives a list of students for a > course > with row key- Course Id > Columns - Name, Teach_Nm, StudID1, StudID2, StudID3 > Values - Maths, Prof. Abc, 20,21,25 > where 20,21,25 are IDs of students. > > We have > > fixed columns like Course Name, Teacher Name, and a dynamic number of > > columns like 'StudID1', 'StudID2' etc, and my thoughts were that we could > > look for 'StudID' and get all the columns with the student Ids in Hector. > But the > > question was how would we determine the number for the column, like to add > > StudID3 we need to read the row and identify that 2 students are there, > > and this is the third one. > > > So we can remove the number in the column name, altogether and keep > > columns like Course Name, Teacher Name, Student:20,Student:21, Student:25, > > where the second part is the actual student id. However here we run into > > the second issue that we cannot have some columns of a composite format > > and some of another format, when we use static column families- all > > columns would need to be in the format UTF8:integer We may want to treat > > it as a composite column key and not use a delimiter- to get sorting, > > validate the types of the parts of the key, not have to search for the > > delimiter and separate the 2 components manually etc. > > > A third option is to put only data in the column name for students like > > Course Name, Teacher Name, 20,21,25 - it would be difficult to identify > > that columns with name 20, 21, 25 actually stand for student names - a bit > > unreadable. > > > I hope this is not confusing, and would like to hear your thoughts on this.The > question is > > around when you de-normalize & want to have some static info like name , > > and a dynamic list - whats the best way to model this. > > > Regards, > > Roshni > -- Regards and Thanks Soumya Kanti Acharya --f46d0401697f53daa304c9991042 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable I just started learning Cassandra any suggestion where to start with ??
=

Thanks
Soumya

On Thu, Sep 13,= 2012 at 10:54 AM, Roshni Rajagopal <roshni_rajagopal@hotmail.c= om> wrote:
I want to learn how we can model a mix of static and dynamic columns i= n a family.

Consider a course_students col family = which gives a list of students for a course
with row key- Course = Id
Columns - Name, Teach_Nm, StudID1, StudID2, StudID3
Values -= Maths, Prof. Abc, 20,21,25=A0
where=A020,21,25 are IDs of students.

We have

fixed columns like Course Name, Teacher Name, and a dynamic number of

columns like 'StudID1', 'StudID2' etc, and my thoughts w= ere that we could

look for 'StudID' and get all the columns with the student Ids i= n Hector. But the

question was how would we determine the number for the column, like to a= dd

StudID3 we need to read the row and identify that 2 students are there,<= /p>

and this is the third one.


So we can remove the number in the column name, altogether and keep

columns like Course Name, Teacher Name, Student:20,Student:21, Student:2= 5,

where the second part is the actual student id. However here we run into=

the second issue that we cannot have some columns of a composite format<= /p>

and some of another format, when we use static column families- all

columns would need to be in the format UTF8:integer We may want to treat=

it as a composite column key and not use a delimiter- to get sorting,

validate the types of the parts of the key, not have to search for the

delimiter and separate the 2 components=A0=A0manually etc.=A0


A third option is to put only data in the column name for students like<= /p>

Course Name, Teacher Name, 20,21,25 - it would be difficult to identify<= /p>

that columns with name 20, 21, 25 actually stand for student names - a b= it

unreadable.


I hope this is not confusing, and would like to hear your thoughts on th= is.The question is

around when = you de-normalize & want to have some static info like name ,

and = a dynamic list - whats the best way to model this.


Regards,

Roshni




--
Regards and Thanks
= Soumya Kanti Acharya
--f46d0401697f53daa304c9991042--