-3

How to create a views in Cassandra,Can you give me an example, which data is coming from two or more tables.

user1983299
  • 393
  • 1
  • 5
  • 16

1 Answers1

2

You can't create views in Cassandra. Just like you can't do joins. It's not that kind of a database. With Cassandra you model your schema differently and you denormalize.

Theo
  • 131,503
  • 21
  • 160
  • 205
  • HI Theo,Thank you for your answer, Could you please give me an Example for how can we model the schema in Cassandra. – user1983299 Jun 28 '13 at 10:43
  • No, not with the information you have provided. – Theo Jun 28 '13 at 12:05
  • Hi Theo, I have to retrieve the data from two tables, Here are my two tables in Cassandra DataBase. employee is keyspace, Two tables: 1.emp:- "eno" is primay key,"username","password" 2.Dept:-"dno" is primary key ,"eno","dname" Now i want to retrieve the data from two tables, Ex:- eno,username,password,dno,dname How can i retrieve data from two tabels. Thanks in Advance – user1983299 Jul 01 '13 at 06:21
  • As of Cassandra 3.0, it is now possible to create [Materialized Views](https://www.datastax.com/dev/blog/new-in-cassandra-3-0-materialized-views), although in truth, these are more like a 'synchronized table' and has storage and write overhead - whereas an non-materialized RDBMS view is essentially a projection function which only incurs cost when it is invoked. – StuartLC Sep 05 '17 at 15:40