Question Details

No question body available.

Tags

data-modeling

Answers (1)

November 19, 2025 Score: 3 Rep: 139,531 Quality: Medium Completeness: 30%

I am wanting to build something like a hierarchical organization of content

This is your mistake. You jump to a familiar solution (which happens to be wrong most of the time), and then you try to fit your project into it.

Do it the other way around.

Collect the requirements. Think about how the information would be accessed. And only then come with the data structures that fit.

It may end up being a hierarchy. I hardly doubt it (as your own very basic example already shows a problem, where something can belong to multiple categories at once), but it might.

It may also be a flat structure with either tags or cross links or both. Such as on Wikipedia, where C++ page is at the root, not hidden in some arbitrary categories, such as “statically typed programming languages” which is part of “programming languages” which itself is part of “software development.”

It may be a tree of connections, such as Facebook.

Or it may be a mix of all those approaches, or something completely different.