In other words, the transitive closure of a graph is a graph which contains an edge (u,v) whenever there is a directed path from u to v.
As already mentioned, SQL has historically been unable  to express recursive functions needed to maintain the transitive closure of a graph without an auxiliary table. There are many solutions to solve this problem with a temporary table (some even elegant ), but I still haven’t found one to do it dynamically.
Posted from Diigo. The rest of my favorite links are here.