Ask HN: What are good resources for learning data modelling in cassandra?

6 points by prats226 ↗ HN
I have started using cassandra for one of the projects I am working on and I did datastax course on data modeling. However in practice, there are several cases where I get stuck with what would be correct way to model data. To give example, https://stackoverflow.com/questions/41025245/cassandra-update-value-in-one-of-the-clustering-column So I am searching for good sources to read more about data modeling and explore more real life examples. What are resources that you found useful?

2 comments

[ 5.3 ms ] story [ 18.6 ms ] thread
How about this free tutorial from datastax ?

https://academy.datastax.com/resources/ds201-foundations-apa...

I already did this course. However there still a few cases which are not clear to me. I don't know if sub-optimal solution I am assuming for those cases is correct or I am doing any mistake with data modeling / there is alternate way of data modeling to avoid it.

For eg. It is advisable in cassandra to do data modeling around queries. However if I model set a column as clustering column for the purpose of sorting based on it and if that object is dynamic, because it is clustering column, I cannot update its value since it belongs to primary key now for that table. In that case, two options are

1) Sorting on client side (which is bad) 2) Delete complete row and insert new row (which will create tombstone) Is there other valid way of achieving this in Cassandra data modeling?

Eg. I have table_A and for query of getting all rows with a particular state, table_A_by_state. However since state will be dynamic, and you will need to update state in table_A_by_state which comes with options I mentioned above. Has someone else faced same problem or is there other way of data modeling for this problem?

table_A: Columns: id (K), name, state

table_A_by_state: Columns: id (K), state (C), name