0

I'm working on a project that required categories, I used a nested set model and it worked out well. I have another portion of the same project, however it requires a different type of hierarchy, there will only ever be a parent. So, an item can only EVER relate to one other item.

Would you say for this, using simply parent_id would be more appropriate then a full nested set model?

Thank you!

dzm
  • 22,844
  • 47
  • 146
  • 226
  • 1
    See http://stackoverflow.com/questions/4048151/what-are-the-options-for-storing-hierarchical-data-in-a-relational-database for a thorough treatment of those options and others. – orangepips Oct 19 '11 at 18:18

1 Answers1

0

I would say it doesn't matter. I think of nested set and adjacent tree model as different data structure but the same type of hierarchical tree. I think of a ternary trie and a patricia trie. Both have a different data structure but the type trie is the same.

Micromega
  • 12,486
  • 7
  • 35
  • 72