Handling Hierarchy Data in Database

后端 未结 6 1853
面向向阳花
面向向阳花 2021-02-03 14:05

I\'m curious to know what the best way (best practice) to handle hierarchies are in regards to database design. Here is a small example of how I usually handle them.

6条回答
  •  名媛妹妹
    2021-02-03 14:29

    You may also want to check out the "nested sets" pattern:

    http://www.intelligententerprise.com/001020/celko.jhtml (Broken Link)

    Or you can Google for more.

    P.S.: Curses, n8wrl, you type faster than I do!

提交回复
热议问题