简体   繁体   中英

Static Column Family in Cassandra vs Dynamic Column Family?

I have started working with Cassandra and I was going through Static column family and Dynamic column family and I am wondering when do we use static column family as compared to dynamic column family ?

In my use case, I will be having huge JSON document, that I need to store into Cassandra. So I was thinking to use dynamic column family for that. But before that I wanted to understand more about the differences between the column families?

Can anyone highlight some differences between those and when to use what?

Static column families are analogous to regular relational tablee where the table's key corresponds to the column family's rowkey and each of the other columns in the table have their on key/value pair in the column family.

Dynamic column families are more for time series use cases, where there is an arbitrary number of key/value pairs to store for each rowkey. The column names in this case are usually timestamps, but they can have other meanings depending on the use case. An example would be a column family for tweets. Each row contains the tweets for one user whose twitter handle is the row key. Each key value pair has a column name equal to the tweet's timestamp (or maybe tweet ID) and the value is a composite value made up of all of the tweet's attributes.

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