Found 2 comments on HN
calpaterson · 2015-10-02 · Original thread
I don't know much about this but Joe Celko has a whole book on representing trees in SQL:

The obvious first question would be: why are you representing your data as a graph? Can you represent it better as sets of predicates (ie: relations)?

Using views should not reduce the number of queries: a view is just a query with a name. If you can do it by combining views you can do it by combining queries.

Todd · 2014-11-21 · Original thread
A good book on the subject is Joe Celko's Trees and Hierarchies in SQL for Smarties.

He spends a chapter on each of the models outlined in this post: adjacency, path, and nested set models.

Get dozens of book recommendations delivered straight to your inbox every Thursday.