Hello, I ran into the problem of designing a database.
The problem is that I have an entity, such as a product. This item has nested attributes, i.e. attributes are dependent. Outwardly, it looks like this:
Product
- Attribute # 1
- By attribute number 1
- Under the attribute number 2
- Under the attribute number 1
- Attribute number 2
- Attribute number 3
How do I store this tree dependency in MySQL? The user can request Under the Attribute number 1 and I must issue all entities that have Under the Attribute number 1 at the same time show the entire tree of parents. How can I do that? With reference books? I read about the Closure Table, do not quite understand whether it will help me or not.
Nesting levels can be 3 and 5 and 7, but not more than 10. Thanks for the answers.
Nested Sets,Materialized Path- vp_arth