Hello,

 

Composite keys are always good  and model looks clean to me. Run pilot with around 10 GB or more data and compare it with RDBMS and make changes accordingly.

 

Thanks and Regards

Rishabh Agrawal

 

From: Kanwar Sangha [mailto:kanwar@mavenir.com]
Sent: Wednesday, February 06, 2013 7:10 AM
To: user@cassandra.apache.org
Subject: DataModel Question

 

Hi –  We are designing 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:   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:198765432345] – This can have multiple values since each chat conv can have many messages. 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

 









NOTE: This message may contain information that is confidential, proprietary, privileged or otherwise protected by law. The message is intended solely for the named addressee. If received in error, please destroy and notify the sender. Any use of this email is prohibited when received in error. Impetus does not represent, warrant and/or guarantee, that the integrity of this communication has been maintained nor that the communication is free of errors, virus, interception or interference.