1

I've decide to use NOSQL, Cassandra DB in my new project.
I could't found any document that can help me. I have a huge one-to-many relation in my data model! the question is that, when I want to query on my column family it will return many rows with many similar columns and just one different column for the values of composite column:

ID  |   Name|   Age|   ExtraInfo|
--------------------------------------------  
myId| myName| myAge|"info": 5423|  
myId| myName| myAge|"info": this's a test string|  
myId| myName| myAge|"info": 454$|  
--------------------------------------------  

We will have redundancy in returned result!
Also, how we can update a composite column in Cassandra? for example how we can insert new column in a composite column for an existing row? should we repeat all data of an id in this case (id and name and age)? what will happen if the rows are so heavy?

Let me ask another question, too! Can we use different types for values of composite columns as above example?

Community
  • 1
  • 1
Elnaz
  • 2,854
  • 3
  • 29
  • 41

1 Answers1

2

As NOSQL is not a relational database, and as you have mentioned that you have huge one to many relations, I'd recommend you to use a relational database like MSSQL or MySql.

As it seams that you are already a relational database user, Please consider reading more about NOSQL databsese, Their joining, Ordering, ... before starting a whole new project using NOSQL.

P.S.: Your question is very general and you can not be answered here, you must first read about it and ask only specific questions which articles don't cover.

Update:

Here is a tutorial for Cassandra NoSQL that you can find examples for CRUD operations and much more: http://www.tutorialspoint.com/cassandra/cassandra_introduction.htm

Ashkan Mobayen Khiabani
  • 33,575
  • 33
  • 102
  • 171
  • Thank you.Which link or resource would help me be more familiar with cassandra NOSQL? – Elnaz Feb 10 '16 at 06:18
  • @Elnaz I updated my answer and added a tutorial for cassandra, I hope that this helps you to find your answers. – Ashkan Mobayen Khiabani Feb 10 '16 at 11:16
  • Oh this is really helpful! I found another link too, according to your answer: http://www.datastax.com/dev/blog/basic-rules-of-cassandra-data-modeling. I hope that it can be helpful, too. – Elnaz Feb 10 '16 at 11:59
  • I don't have much experience with NoSQL databases but if you have any questions about Relational databases I can help – Ashkan Mobayen Khiabani Feb 10 '16 at 12:05
  • Thank you Mr. Khiabani for your answers. It was useful and I vote it up. But, I haven't reached to my complete answer and I'm waiting for new answers, yet! Of curse I will use your helps in RDBs. – Elnaz Feb 10 '16 at 12:51