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 35377E762 for ; Wed, 6 Feb 2013 01:40:15 +0000 (UTC) Received: (qmail 97451 invoked by uid 500); 6 Feb 2013 01:40:12 -0000 Delivered-To: apmail-cassandra-user-archive@cassandra.apache.org Received: (qmail 97417 invoked by uid 500); 6 Feb 2013 01:40:12 -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 97409 invoked by uid 99); 6 Feb 2013 01:40:12 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2013 01:40:12 +0000 X-ASF-Spam-Status: No, hits=2.9 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [206.225.165.119] (HELO HUB024-nj-4.exch024.serverdata.net) (206.225.165.119) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 06 Feb 2013 01:40:04 +0000 Received: from MBX024-E1-NJ-6.exch024.domain.local ([10.240.10.56]) by HUB024-NJ-4.exch024.domain.local ([10.240.10.39]) with mapi id 14.02.0318.001; Tue, 5 Feb 2013 17:39:43 -0800 From: Kanwar Sangha To: "user@cassandra.apache.org" Subject: DataModel Question Thread-Topic: DataModel Question Thread-Index: Ac4ECSwg+LuDKyd2QHepHwyoDMOidg== Date: Wed, 6 Feb 2013 01:39:42 +0000 Message-ID: <57C7C3CBDCB04F45A57AEC4CB21C0CCD1DB1F7C1@mbx024-e1-nj-6.exch024.domain.local> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [76.184.245.196] Content-Type: multipart/alternative; boundary="_000_57C7C3CBDCB04F45A57AEC4CB21C0CCD1DB1F7C1mbx024e1nj6exch_" MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org --_000_57C7C3CBDCB04F45A57AEC4CB21C0CCD1DB1F7C1mbx024e1nj6exch_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Hi - We are designing a Cassandra based storage for the following use case= s- * Store SMS messages * Store MMS messages * Store Chat history What would be the ideal was to design the data model for this kind of appli= cation ? I am thinking on these lines .. Row-Key : Composite key [ PhoneNum : Day] * Example: 19876543456:05022013 Dynamic Column Families * Composite column key for SMS [SMS:MessageId:TimeUUID] * Composite column key for MMS [MMS:MessageId:TimeUUID] * Composite column key for user I am chatting with [UserId:198765432= 345] - This can have multiple values since each chat conv can have many mes= sages. Should this be a super column ? 19866666666:05022013 SMS:xxxx:ttttttt SMS:xxx12:ttttttt MMS:xxxx:ttttttt XXXX:1933333333 19877777777:05022013 19878888888:05022013 Thanks, Kanwar --_000_57C7C3CBDCB04F45A57AEC4CB21C0CCD1DB1F7C1mbx024e1nj6exch_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Hi –  We are designi= ng a Cassandra based storage for the following use cases-=

 

·        Store SMS messages=

·        Store MMS messages=

·        Store Chat history=

 

What would be the ideal was to = design the data model for this kind of application ? I am thinking on these= lines ..

 

Row-Key :  Composite key [= PhoneNum : Day]

 

·        Example:   19= 876543456:05022013

 

Dynamic Column Families

 

·        Composite column key fo= r SMS [SMS:MessageId:TimeUUID]

·        Composite column key fo= r MMS [MMS:MessageId:TimeUUID]

·        Composite column key fo= r user I am chatting with [UserId:198765432345] – This can have multi= ple values since each chat conv can have many messages. Should this be a su= per column ?

 

 

19866666666:05022013=

SMS:xxxx:ttttttt

SMS:xxx12:ttttttt

MMS:xxxx:ttttttt

XXXX:1933333333

19877777777:05022013=

 

 

 

 

19878888888:05022013=

 

 

 

 

 

 

Thanks,

Kanwar

 =

--_000_57C7C3CBDCB04F45A57AEC4CB21C0CCD1DB1F7C1mbx024e1nj6exch_--