This series of posts is specific for Ohioedge Jeebuilder however patterns adopted should be generic enough for any SQL->Cassandra migration.
Pattern #1: Get rid of all sql joins and move join-logic in the middle-tier. For example, consider a typical SQL query to find all employees of an employer:
select er1.employerName, ee1.employeeName
from employee ee1, employer er1
where ee1.employerID = er1.employerID
and er1.employerName = ?1
To make this work in Cassandra, we need to split this query in two:
Query #1: Employee-query
where employerID = ?1
where employerName = ?1
and let Ohioedge Jeebuilder generate the graph (by internally first executing employer-query and then executing employee-query for the found employer):
The split two queries are Cassandra compliant and join-logic is now in the middle-tier.