Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
312 views
in Technique[技术] by (71.8m points)

SQL Server Graph Database - shortest path using multiple edge types

I have done my research on SQL Server GraphDB, but all the contrived examples I've found so far use only a single edge table. It's always Person-friend_of->Person, for example. In my case, I've created a graph of deployed software components in our datacentre, and there are different edges/relationships. Things like Application-connects_to->SqlDatabase and Server-hosts->Application.

I want to write a query that will show me the shortest path between any two nodes, regardless of the Edges used. I think if I was using Neo4j, I'd write the MATCH as something like:

Server-*->SqlDatabase Notice the asterisk.

Is there an idiomatic way to do this in SQL Server?

question from:https://stackoverflow.com/questions/66061525/sql-server-graph-database-shortest-path-using-multiple-edge-types

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...