HBase and Cassandra are built as wide column stores, using the concepts of both rows and columns.
A row is composed of a key similar to the concept of primary key in RDBMS and a value composed of several columns
A representation can be the following:
*******| 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"
... ... ...
Is it correct at the application layer, to build composed primary keys to allow to iterate quickly over colocated rows.
This can be reprensented as follow.
*******| 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"
... ... ...
The name
column moved from the Value
to the Key
and Value
has a single
column name value
.