Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to manage duplicated Data between different tables in Query-Driven Data Model in Cassandra?

I'm new in Cassandra NOSQL DB. I've read A Big Data Modeling Methodology for Apache Cassandra and Basic Rules of Cassandra Data Modeling as useful articles about data modelling in Cassandra. In this pages, it's mentioned that, data duplication is used to achieve best performance (more write) based on Query-Driven methodology.OK! We will have a physical diagram as this:
enter image description here
As you see, ave-rating is duplicated in three tables.The question is that, when we want to update or insert ave-rating:

  • Does Cassandra have any tools itself to manage write in any tables having this column?(CRUD operations in duplicated Data toward some columns)
  • Is there any third-party tool for issue, above?
  • Should this issue be handled in application level? if yes, what is the best practice, then?
like image 829
Elnaz Avatar asked Sep 15 '25 12:09

Elnaz


1 Answers

Does Cassandra have any tools itself to manage write in any tables having this column?

Yes, look at materialized views: http://www.doanduyhai.com/blog/?p=1930 And here too: http://www.datastax.com/dev/blog/understanding-materialized-views

like image 166
doanduyhai Avatar answered Sep 18 '25 11:09

doanduyhai