I have a table that contains all the "Edges" between "Nodes" with relation "from node to node".
Table Nodes looks like this:
CREATE TABLE Nodes(
Id VARCHAR(10) PRIMARY KEY,
Name VARCHAR(50)
)
CREATE TABLE Edges(
Id VARCHAR(100) PRIMARY KEY,
FromId VARCHAR(10),
ToId VARCHAR(10)
)
These tables are used to describe a network chart like the one rapresented in the image.
I have to create a recursive query in order to get all nodes the paths that pass throug "FROM" nodes and and arrive to "TO" nodes. I have also to avoid infinite loop like the one highlighted in yellow rectangle.
So basically the spider have to check for all the nodes the available paths, track the nodes that it has already passed and then go ahead till It reach "TO" nodes.
Then in a second moment, once I have all the routes, I need to test what are the routes thas has arrived to destination passing throug the FROM path.
How can i do this by Query ?
Thanks to support