简体   繁体   English

triplestores和图形数据库之间有什么区别?

[英]What is the difference between triplestores and graph databases?

There are triplestores (semantic databases), and there are general-purpose graph databases. 有三个商店(语义数据库),还有通用图形数据库。

Both are based on the similar concepts of linking one "item" to another via a relationship. 两者都基于通过关系将一个“项目”链接到另一个“项目”的类似概念。 Triplestores support RDF and are queried by SPARQL, but such add-ons can be (and are) implemented ontop of general-purpose graph databases as well. Triplestores支持RDF并由SPARQL查询,但是这些附加组件也可以(并且)在通用图形数据库的顶部实现。

What is the fundamental difference that would make you prefer a semantic db / triplestore to a general purpose graph database like neo4j? 什么是使您更喜欢语义db / triplestore到neo4j这样的通用图数据库的根本区别?

Triples stores are graph databases. 三元组商店图形数据库。 RDF is a graph. RDF 一个图表。 Granted, triple stores tend to not store the information internally as a graph; 当然,三重商店往往不会在内部将信息存储为图表; that's sub-optimal for query answering, but they're still graph databases. 这对于查询回答来说是次优的,但它们仍然是图形数据库。

You'd prefer them to something like neo4j if you're interested in an ecosystem based on W3C standards. 如果你对基于W3C标准的生态系统感兴趣,你会更喜欢neo4j。 Makes interop with other RDF-based systems trivial, and it makes picking up everything and moving to a different triple store quite painless. 与其他基于RDF的系统互操作变得微不足道,它使得拾取所有东西并移动到不同的三重存储非常轻松。

To start with, besically all data-structures can be projected more or less painful into any underlying storage engine (or even your file system and text files). 首先,所有数据结构都可以或多或少地投射到任何底层存储引擎(甚至文件系统和文本文件)中。 The reason to choose a certain data model and storage backend are IMHO: 选择特定数据模型和存储后端的原因是恕我直言:

  • your development and modelling preferences 您的开发和建模首选项
  • your expected runtime performance for inserting, storing, and querying of your model. 用于插入,存储和查询模型的预期运行时性能。

As mentioned before, both RDBMSes and TripleStores tend to be useful at runtime in "shallow" traversing of JOIN or SparQL traversals, and do much work in caches or prepared views etc. Graph Databases (uniquely Neo4j) put the graph structure actually down to the storage layer and do pointer chasing (with a number of optimizations) on node-record level. 如前所述,RDBMS和TripleStores在运行时在JOIN或SparQL遍历的“浅层”遍历中往往很有用,并且在缓存或准备好的视图等方面做了很多工作。图形数据库(唯一的Neo4j)实际上将图形结构放到了存储层并在节点记录级别上执行指针追踪(具有许多优化)。 Thus, when traversing the graph, you don't need to touch more than your current subgraph down to the storage layer, thus being able to traverse parts of the data without touching the whole graph, resulting in constant performance for a number of interesting scenarios. 因此,当遍历图形时,您不需要触摸比当前子图更多的内容到存储层,因此能够遍历部分数据而不触及整个图形,从而导致许多有趣场景的持续性能。

My 2 cents. 我的2美分。

Neo4j comes under the category of Property Graph. Neo4j属于Property Graph类别。 They support directed relations and each relation has only two nodes; 它们支持有向关系,每个关系只有两个节点; the start node and end node. 起始节点和结束节点。 The nodes and relationships can store arbitrary data in the form of key-value pairs. 节点和关系可以以键值对的形式存储任意数据。 They however can't support 3-ary relations. 然而,他们无法支持3-ary关系。 ie You can't have one edge connecting more than two nodes ie a kind of hyperdege . 即你不能有一个边连接两个以上的节点,即一种超级范围 You can however emulate a 3-ary relations in property graphs by creating join nodes. 但是,您可以通过创建连接节点来模拟属性图中的3元关系。 You can see how to implement this in neo4j here . 你可以在这里看到如何在neo4j中实现它

Triplestores have standardized query language in the form of SPARQL but no standard exists yet for querying other graph databases. Triplestores以SPARQL的形式具有标准化查询语言,但是还没有用于查询其他图形数据库的标准。 RDF is the standard for importing/exporting from triplestores. RDF是从triplestores导入/导出的标准。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 图形数据库和RDF三重存储:在python中存储图形数据 - Graph databases and RDF triplestores: storage of graph data in python 有向图和无向图有什么区别 - What is the difference between a directed and undirected graph 无向图和无权图有什么区别? 它们是一样的吗? - What's the difference between undirected graph and unweighted graph? Are they the same thing? 图表DB与文档DB与Triplestores - Graph DBs vs. Document DBs vs. Triplestores 图的深度优先搜索 (DFS) 中的 for/of 和 forEach 有什么区别? - What is the difference between for/of and forEach in the depth-first search (DFS) of a graph? CorePlot:majorTickLocations(图)和setYRange(图空间)之间有什么区别? - CorePlot: what is the difference between majorTickLocations (graph) and setYRange (plot space)? List和Graph的数据结构有什么区别? - What's the difference between the data structure List and Graph? graph.windows.net 和 graph.microsoft.com 有什么区别? - What's the difference between graph.windows.net and graph.microsoft.com? 图切割和图搜索之间有什么区别吗? - Is there any difference between graph cut and graph search? 使用 LinkedList 与 HashMap 实现无向图有什么区别? 遍历 BFS/DFS 哪个更好? - What is the difference between implementing an undirected graph with LinkedList vs HashMap? What is better for traversing BFS/DFS?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM