I want to categorize the content in my application by terms like this:
Education (parent category)
– High Schools
Stores (parent category)
My question, what is the best way to model such taxonomy trees in the models and database (I use PostgreSQL). How to store the data about parents and children filter results by either parent level term or child level terms? How to store the parent-child relationship in the database?
There might be a situation where the tree might extend to 3 levels, not only two.