First of all, great article. It can be used both as a great introduction to graph tables and to solve a fairly common problem. Your order of revelation and the clarity of the code and their explanations is awesome.
Shifting gears a bit and with the understanding that this next part has nothing to do with your fine article (or maybe it does but I don't know enough about graph tables to say so), it sounds to me like you can't find the shortest path without actually knowing the number of hops to make so you know how many times to self join a table. With things kicking around like Map Quest and Google Maps on an almost casual and frequently unappreciated manner, it's just amazing to me that MS can't easily determine the shortest FK path between two tables, regardless of the number of hops, in such a limited domain of nodes as the tables in such a small database. Like I said, I might be reading that wrong because I'm fairly new to graph tables and don't have much reason to do a deep dive on them.
That, not withstanding, this is pretty interesting and you've inspired me to play a bit with such networks of nodes.
Thank you again for taking the time to put this article together.
is pronounced "ree-bar
" and is a "Modenism
" for R
First step towards the paradigm shift of writing Set Based code:
________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
"Change is inevitable... change for the better is not".
"Dear Lord... I'm a DBA so please give me patience because, if you give me strength, I'm going to need bail money too!"
How to post code problems
How to Post Performance Problems
Create a Tally Function (fnTally)