I have just started to use Cassandra DB. I want to create materialized views on Cassandra (to store queries) but, after seeking in google, I haven't found any information about it. Maybe it is not permitted in Cassandra?
Well, materialized views in relational DB (Oracle for instance) can be created with the following statement:
CREATE MATERIALIZED VIEW table_mv
BUILD IMMEDIATE
REFRESH FAST ON COMMIT
AS SELECT * FROM tabla;
Does something similar exist in Cassandra CQL? Or, how can I store a query in a table in Cassandra CQL?
Thanks
When using Cassandra DB almost all of your tables should essentially be materialized views (IE every table should be the answer to a query you want to preform). You then update them on the application side of your program. Obviously this will require some duplication of data but since writes in Cassandra are cheap this is the preferred way of modeling.
For more information check out these links
C* Summit 2013: The World's Next Top Data Mode https://www.youtube.com/watch?v=HdJlsOZVGwM
http://www.slideshare.net/patrickmcfadin/the-data-model-is-dead-long-live-the-data-model
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With