hi everyone, in my team, we are considering using cassandra for our project in place of a (pseudo)relational solution, but I am not sure on how we should handle a couple of modeling issues. Basically, my problem is how to bring into cassandra a db where elements are in the form <primary, secondary, attached data..> with the pair <primary, secondary> is unique (think <node, node, arc weight>) and we mostly do queries in the form select secondary, data from db where primary= x ---- perfect fit for cassandra
and in batch jobs we want to rewrite the whole thing _but_ using the other key for lookup, akin to 1. insert or update (primary, secondary, data) values (.. .. .. ) -- we can do this using the primary lookup 2. delete from db where secondary = x and not in just inserted -- how do we do this? it is my understanding that cassandra does not support secondary indexes so we would have to do a full scan to perform the #2 operation, or we should mantain the second index by ourselves indexed on secondary and containing references to the primary. Am I missing something? Sorry for the dumb question/faq but I am not smart enough to shift my mental easily :) -- blog en: http://www.riffraff.info blog it: http://riffraff.blogsome.com
