Fast Relational method of storing tree data (for instance threaded comments on articles)

后端 未结 6 1116
你的背包
你的背包 2020-12-13 10:59

I have a cms which stores comments against articles. These comments can be both threaded and non threaded. Although technically they are the same just with the reply column

6条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-13 11:47

    I just did this myself, actually! I used the nested set model of representing hierarchical data in a relational database.

    Managing Hierarchical Data in MySQL was pure gold for me. Nested sets are the second model described in that article.

提交回复
热议问题