Sent from Samsung Mobile.
Hi All,
I am trying to model RDBMS joins into cassandra. As I am new to cassandra, I
need your help/suggestion on this. Below is the information regarding the
query:
I have a query in RDBMS as follows:
select t3.name from Table1 t1, Table2 t2, Table3 t3, Table4 t4 where
t2.cust_id = 3 and t4.sid = t1.sid and t1.colid = t2.colid and t4.cid = t3.cid
Now, trying to make a shimilar query in cassandra:
As per my learning experience in Cassandra, I got the below 2 solutions: (as
cassandra does not support joins)
****Solution 1:*****
1) Fetch all the records with t2.cust_id = 3
2) Now again run another query that will do the condition t3.sid = t1.sid on
the results returned from point 1.
3) continue the same for all the conditions.
Drawbacks with this approach:
For each join, I have to do a network call to fetch the details. Also, it will
take more time..as I am running multiple conditions
****Solution 2: *****
1) Create a map table for every possible join.
Drawbacks with this aproach:
I think, this is not a right approach. So join to table (map table) mapping
idea is not right.
pastebin link for the same: http://pastebin.com/FRAyihPT
Please suggest me on this.