How to design database for tree view with an infinite depth
What we have always done is do it as a self join, with a parent_id which points to the parent.  This has the advantage of being simple, easy to work with, etc.  Of course it also requires recursion and WITH RECURSIVE CTE's.  It is easy to work with and as long as you are not working at huge depths and lots of records it performs well (note you can generate to a set depth and then fetch more records when a user expands if you want).