cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shrikar archak <shrika...@gmail.com>
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.

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


Requirements
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
field?
Or what would be the best way to model this data.

Thanks,
Shrikar

Mime
View raw message