I'm working on a POC to showcase how Cassandra works. I took Digg as an example. I wanted to create a data model that'll let me:
1) Add links 2) Add a link to a user favorite list. 3) Attached predetermined tags to links
I came up with two Column Families:
Links
- url is the key
- id (a generated uuid)
- user (who added it)
- favCount (no of users who favorited the link)
- upCount (no of users who liked it)
- downCount (no of users who disliked it)
- url is the key
UserFavs
- user is the key
- id (as many ids as the user has favorited)
- user is the key
This works fine for requirements #1 and #2 above, but when I come to #3 it gets trickier. I can add tags like 'java', 'languages', 'architecture' as column names with empty values in the Links column family. But querying will take a long time, let's say if I were to find out all the links that were tagged under 'java'.
Can anyone throw some ideas of how this can be implemented.
If I'm not clear with the question, please let me know.
Thanks, Kumar