Cassandra:什么是子列
http://wiki.apache.org/cassandra/CassandraLimitations
引用: Cassandra 有两级索引:键索引和列索引。但在超级列族中还有第三级子列;这些没有索引,并且对子列的任何请求都会反序列化该超级列中的所有子列。因此,您希望避免需要大量子列的数据模型。
=> 子列到底是什么?有趣的是,谷歌搜索这个词并没有真正产生结果。我知道超列的概念,但不太清楚术语“子列”到底指什么(如何定义):
什么概念是正确的?
第一:
ROW-KEY
SubCol SubCol
col col col val
val val col val
或
第二:
ROW-KEY
Column Column
SubCol SubCol SubCol SubCol
val val val val
此外,定义中的内容是什么:
comparator = UTF8Type and
subcomparator = UTF8Type and
这只是定义的问题。
谢谢 马库斯
http://wiki.apache.org/cassandra/CassandraLimitations
Quote:
Cassandra has two levels of indexes: key and column. But in super columnfamilies there is a third level of subcolumns; these are not indexed, and any request for a subcolumn deserializes all the subcolumns in that supercolumn. So you want to avoid a data model that requires large numbers of subcolumns.
=>What is exactly the subcolumn? It's interesting, googling the term does nor really yield in results. I know the concepts of supercolumn, but its not really clear what exactly the term "subcolumn" refers to (how it is defined):
What concept is correct?
First:
ROW-KEY
SubCol SubCol
col col col val
val val col val
OR
Second:
ROW-KEY
Column Column
SubCol SubCol SubCol SubCol
val val val val
Furthermore, what is what in the Definitions:
comparator = UTF8Type and
subcomparator = UTF8Type and
Its only a matter of definition.
Thanks
Markus
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
标准列的父级是其行。子列的父列是其超级列。除此之外,它们是相同的 - 只是有一个额外的嵌套级别,尽管正如您提到的那样对索引和检索有影响。
更多信息请访问 http://wiki.apache.org/cassandra/DataModel 和 http://arin.me/blog/wtf-is-a-supercolumn-cassandra-data-model
普通列族:
超级列族:
A standard column's parent is its row. A sub-column's parent is its supercolumn. Apart from that, they are the same - there's just an additional level of nesting, though there are implications for indexing and retrieval as you've mentioned.
More info at http://wiki.apache.org/cassandra/DataModel and http://arin.me/blog/wtf-is-a-supercolumn-cassandra-data-model
Normal column family:
Super column family:
comparator
值指示列在查询中返回给您时将如何排序。相同的概念适用于子比较器,但适用于超级列。UTF8Type
指的是字符的 Unicode 标准。The
comparator
value indicates how columns will be sorted when they are returned to you in a query. The same concept applies tosubcomparator
, but for super columns.UTF8Type
refers to the Unicode standards for characters.