TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: Simple-graph – a graph database in SQLite

237 点作者 dpapathanasiou超过 4 年前

9 条评论

rklaehn超过 4 年前
Interesting. SQLite is awesome.<p>I did something similar recently, a block store for a rust implementation of ipfs, which models a directed acyclic graph of content-addressed nodes.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;actyx&#x2F;ipfs-sqlite-block-store" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;actyx&#x2F;ipfs-sqlite-block-store</a><p>I found that performance is pretty decent if you do almost everything inside SQLite using WITH RECURSIVE.<p>The documentation has some really great examples for WITH RECURSIVE. <a href="https:&#x2F;&#x2F;sqlite.org&#x2F;lang_with.html" rel="nofollow">https:&#x2F;&#x2F;sqlite.org&#x2F;lang_with.html</a>
评论 #25546446 未加载
rekwah超过 4 年前
Tangentially related to graph dbs, but if you&#x27;re looking for more hierarchical support, SQLite does has a transitive closure extension[0] that might be of some assistance. I leveraged this back in 2014 to write our framework-agnostic result storage on AWS Device Farm.<p>[0] - <a href="https:&#x2F;&#x2F;www.sqlite.org&#x2F;cgi&#x2F;src&#x2F;artifact&#x2F;636024302cde41b2bf0c542f81c40c624cfb7012" rel="nofollow">https:&#x2F;&#x2F;www.sqlite.org&#x2F;cgi&#x2F;src&#x2F;artifact&#x2F;636024302cde41b2bf0c...</a><p>[1] - <a href="https:&#x2F;&#x2F;charlesleifer.com&#x2F;blog&#x2F;querying-tree-structures-in-sqlite-using-python-and-the-transitive-closure-extension&#x2F;" rel="nofollow">https:&#x2F;&#x2F;charlesleifer.com&#x2F;blog&#x2F;querying-tree-structures-in-s...</a>
评论 #25546243 未加载
kevas超过 4 年前
Why not add that functionality directly to SQLite via stored procs*<p><a href="https:&#x2F;&#x2F;www.amazon.com&#x2F;Hierarchies-Smarties-Kaufmann-Management-Systems&#x2F;dp&#x2F;0123877334" rel="nofollow">https:&#x2F;&#x2F;www.amazon.com&#x2F;Hierarchies-Smarties-Kaufmann-Managem...</a><p>*<a href="https:&#x2F;&#x2F;github.com&#x2F;wolfch&#x2F;sqlite-3.7.3.p1" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;wolfch&#x2F;sqlite-3.7.3.p1</a>
评论 #25545363 未加载
评论 #25545250 未加载
loxias超过 4 年前
I really like this, OP. I&#x27;m member of the clan &quot;why are you creating your own XDR, just use sqlite!!&quot; and have oft jumped to that in technical discussions, so appreciate it.<p>However, what&#x27;s lacking from something like this is a detailed bill of the cost. I&#x27;d love to see some, <i>any</i> benchmark on a DB with &gt; 10^6 edges to see how it goes. That&#x27;s the other hand of the equation &quot;just use sqlite and be happy&quot; -- the expectation that performance will actually be reasonable.
ptrik超过 4 年前
Similar project: <a href="https:&#x2F;&#x2F;github.com&#x2F;CodyKochmann&#x2F;graphdb" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;CodyKochmann&#x2F;graphdb</a>
bjornsing超过 4 年前
How does this perform compared to a “native” graph database like Neo4J?
评论 #25545415 未加载
评论 #25545271 未加载
评论 #25545042 未加载
评论 #25545349 未加载
lolive超过 4 年前
I wonder if there are ways, in SQLite, to build indices for s,p,o&#x2F;s,p&#x2F;p,o&#x2F; and maybe more subtle ones... That would be uber nice, given the fact that most graph databases have their own indexing strategies, and you cannot craft your own.
评论 #25545593 未加载
评论 #25549412 未加载
roland_nilsson超过 4 年前
Isn&#x27;t the whole point of graph databases that they can traverse graph edges efficiently by following pointers to nodes, which relational databases can&#x27;t do? Then it seems a bit strange to implement a graph database on top of a relational database like SQLite?
评论 #25560501 未加载
brian_herman超过 4 年前
Awesome! And you can write SQL queries on the data amazing SQLite is the best database.