|
|
|
|
|
by bokwoon
1780 days ago
|
|
For modelling trees, I much prefer using a list of ancestors compared to the parent-child adjacency list because it doesn't require recursion to answer basic questions. I had thought about how I would model threaded comments in SQL some time ago and wrote down an example of what I mean: https://gist.github.com/bokwoon95/4fd34a78e72b2935e78ec0f40e... |
|
https://www.postgresql.org/docs/current/ltree.html