Kassandra: what is a column

http://wiki.apache.org/cassandra/CassandraLimitations

Quote: Cassandra has two levels of indices: key and column. But in super columnfamilies there is a third level of sub-columns; they are not indexed, and any request for a sub-column deserializes all sub-columns in this super-column. Therefore, you want to avoid a data model that requires a large number of subcolumns.

=> What is a subcolumn? Interestingly, the term "googling" does not really produce results. I know the concepts of a super-column, but it’s not clear what exactly the term sub-column (as defined) means:

Which concept is correct?

Firstly:

ROW-KEY SubCol SubCol col col col val val val col val 

OR

Secondly:

 ROW-KEY Column Column SubCol SubCol SubCol SubCol val val val val 

In addition to what is in the definitions:

 comparator = UTF8Type and subcomparator = UTF8Type and 

This is only a matter of definition.

Thanks Marcus

+2
cassandra
Jun 11 2018-11-11T00:
source share
2 answers

The standard column of a column is its row. The parent of the sub-column is its supercolumn. In addition, they are the same - there is only an additional level of nesting, although there are values ​​for indexing and searching, as you already mentioned.

Additional information at http://wiki.apache.org/cassandra/DataModel and http://arin.me/blog/wtf-is-a-supercolumn-cassandra-data-model

Regular column family:

 row col col col ... val val val ... 

Super Series:

 row supercol supercol ... (sub)col (sub)col ... (sub)col (sub)col ... val val ... val val ... 
+7
Jun 11 2018-11-11T00:
source share

The comparator value indicates how the columns will be sorted when they are returned to you in the query. The same concept applies to subcomparator , but for supercommands.

UTF8Type refers to the Unicode standards for characters.

  • Source: "Kassandra - The Ultimate Guide."
0
Aug 03 '11 at 17:35
source share



All Articles