1

we've been working with supply chain data, where two actors are connected via a Route.

This Route node has information on distance, cost, etc, for transport of goods between the two actors.

My question is, is there any method or algorithm, such as Dijkstra, available somewhere for working with shortest weighted path in RDF and preferably GraphDB?

We looked for pathfinding queries in GraphDB and SPARQL documentation, but did not find anything relevant for weighted paths.

dfreytag
  • 11
  • 1

2 Answers2

0

As far as my knowledge goes, I think that GraphDB does not support weighted shortest path algorithms, such as Dijkstra, out-of-the-box. You might need to play around with SPARQL constructs to achieve it.

Tihomir
  • 21
  • 2
0

GraphDB has a fairly limited capacity to do analytics on graph data. I typically view GraphDB as a database with a focus on linked/graph data rather than an analytics platform. In my experience, knowledge graphs are more about making connections and logically entailing new data. Labeled property graph databases support more of the analytics that you're after. For example, neo4j supports node embedding algorithms, out of the box (and have a whole data science platform built on top of their database). It looks like they even support the algorithm you're after.

GraphDB has a plugin system where you should be able to create a custom index with your weights and interface it via sparql-but it could be a heavy lift. I'd suggest

  1. Finding a paper that outlines a shortest path mechanism for SPARQL (a quick google shows a few)
  2. Implement the routine in your favorite programming language, querying the graph database when you need more node information.
Thomas
  • 720
  • 9
  • 22