HBase 和 Cassandra 构建为宽列存储,使用行和列的概念。
一行由一个类似于RDBMS中的主键概念的键和一个由若干列组成的值组成
表示可以如下:
*******| Key | Value
-------+------------+-------------+------------------------------------------
Colunms| | name | value
-------+------------+-------------+------------------------------------------
| a | title | "Building a python graphdb in one night"
| b | body | "You maybe already know that I am..."
| c | publishedat | "2015-08-23"
| d | name | database
| e | start | 1
| f | end | 2
... ... ...
| u | title | "key/value store key composition"
... ... ...
| x | title | "building a graphdb with HappyBase"
... ... ...
在应用程序层是否正确,构建组合主键以允许快速迭代并置的行。
这可以表示如下。
*******| Key | Value
-------+------------+-------------+------------------------------------------
Colunms| identifier | name | value
-------+------------+-------------+------------------------------------------
| 1 | title | "Building a python graphdb in one night"
| 1 | body | "You maybe already know that I am..."
| 1 | publishedat | "2015-08-23"
| 2 | name | database
| 3 | start | 1
| 3 | end | 2
... ... ...
| 4 | title | "key/value store key composition"
... ... ...
| 42 | title | "building a graphdb with HappyBase"
... ... ...
列name
从 移到Value
并且Key
只有Value
一个列名value
。