简体   繁体   中英

How CRUD operations are possible in Composite columns of a Cassandra Column Family?

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?

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.

PS: 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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM