Links in Riak: what can they do/not do, compared to graph databases?

后端 未结 2 430
不思量自难忘°
不思量自难忘° 2021-01-02 20:17

The familiar Neo4j treats relationships as first class citizens; ad hoc queries/ traversals, integrity (if one node is deleted, the link is gone) etc. It also advertises as

2条回答
  •  一向
    一向 (楼主)
    2021-01-02 21:08

    Links in Riak are just some metadata (list of one-way references to foreign keys) stored along with value. They are usually used as an input to MapReduce that can do whatever you want with them, including simulation of RDBMS joins.

    There are no integrity checks or any additional magic in them like finding reverse links. They are just a convenience API, absolutely the same could have been achieved by storing these lists of foreign keys inside the values, serialized in some way.

    For social bookmarking example I'd recommend using Riak Search, because it allows more flexible queries like http://example.com/* and have proper distributed indexing and lookups.

提交回复
热议问题