cassandra数据结构

cassandra是键值对NoSQL数据库,其数据表结构是这样组织的:

1
2
3
4
5
6
7
keyspace:{
column_family:{
column_family_key:{column_key:column_value, column_key:column_value, ...},
column_family_key:{column_key:column_value, column_key:column_value, ...},
...
}
}

可以这样来访问列:

1
keyspace.column_family\[column_family_key\]\[column_key\] = column_value;

可以将其结构理解为map:

1
Map<RowKey, SortedMap<ColumnKey, ColumnValue>>

References:
[1]Cassandra原理介绍

===
[erq]