cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shrikar archak <>
Subject Data Modelling Information
Date Mon, 09 Dec 2013 19:57:13 GMT
Hi Data Model Experts,
I have a few questions with data modelling for a particular application.

create table messages(
body text,
 username text,
tags set<text>
PRIMARY keys(username,tags)

1) I should be able to query by username and get all the messages for a
particular username
2) I should be able to query by tags and username ( likes select * from
messages where username='xya' and tags in ('awesome','phone'))
3) I should be able to query all messages by day and  order by desc and
limit to some value

Could you guys please let me know if creating a secondary index on the tags
Or what would be the best way to model this data.


View raw message