I have to retrive the data from two tables,
Here are my two tables in Cassandra DataBase.
employee is keyspace,
Two tables:
- emp:- "eno" is primay key,"username","password"
- Dept:-"dno" is primary key ,"eno","dname"
Now i want to retrieve the data from two tables, e.g. eno,username,password,dno,dname.
How can i retrieve data from two tables?
You can't do it in one query if that is what you are asking. That means that you have to carry out two queries and let your application simulate a join, or the other option, denormalize your data so it is in one table.
As for actually carrying out the query there are bundles of APIs that can retrieve data from Cassandra.
Assuming your column families are
empandDeptyou can do querying using the cli:Check the documentation for Cassandra 0.7 for using the CLI.