Riakは、バケットがキーのプレフィックスにすぎない非常に大きなkey -> value
「テーブル」と考える必要があります。バケツがバイナリオブジェクトである限り、バケツで何でもできることがわかったとき。
線形の「テーブル」を作成できます。
<<"table1">>
<<"table2">>
または、階層を作成できます。
<<"db1.table1">>
<<"db1.table2">>
<<"db2.table1">>
<<"db2.table2">>
または、タプルをバケットとして使用することもできます:
1> term_to_binary({"db1", "table1"}).
<<131,104,2,107,0,3,100,98,49,107,0,6,116,97,98,108,101,49>>
2> term_to_binary({"db1", "table2"}).
<<131,104,2,107,0,3,100,98,49,107,0,6,116,97,98,108,101,50>>
3> term_to_binary({"db2", "table1"}).
<<131,104,2,107,0,3,100,98,50,107,0,6,116,97,98,108,101,49>>
4> term_to_binary({"db2", "table2"}).
<<131,104,2,107,0,3,100,98,50,107,0,6,116,97,98,108,101,50>>