I\'m designing a Database and I have some doubts on using Hierarchical datamodels in relational databases.
If I want to deal with categories, subcategories and paren
If you're using Postgres, you can store the hierarchy in an array as a materialized path.
You also benefit from GIN indexing with this approach, which in my experiments has had better performance than a recursive query.