I have around 3500 flood control facilities that I would like to represent as a network to determine flow paths (essentially a directed graph). I\'m currently using SqlServer an
i think your data structure is fine (for SQL Server) but a CTE may not be the most efficient solution for your queries. You might try making a stored procedure that traverses the graph using a temp table as a queue instead, this should be more efficient.
the temp table can also be used to eliminate cycles in the graph, though there shouldn't be any