3 ms·
Choosing a database model for a hierarchical content
- geoah 5y agoI’ve always liked modified preorder tree travelsal for such usecases as they allow to deal with sub tree queries very easily at the expense of heavy writes. Probably not ideal for comments though as they change the tree way too often. https://imrannazar.com/Modified-Preorder-Tree-Traversal https://imrannazar.com/Modified-Preorder-Tree-Traversal