Tree Analogy
Categories and subcategories can be best explained with the tree analogy. For instance, consider furniture as the main category or root, the branches are subcategories such as tables and chairs, and the leaves represent individual products. In this example, a leaf could be an oak dining table that seats four. Visually, it looks like this:Any attribute applied to a category is inherited by its subcategories, known as attribute inheritance. However, inherited attributes can be overwritten by assigning the attribute to the subcategory itself. For example, the broad office chairs category could have a material attribute set to leather, but a specific subcategory could be set to nylon.
- Root: Furniture
- Branch: Tables
- Leaf: Dining Tables
- Product: Oak dining table seating 4
- Product: Oak dining table seating 6
- Leaf: Coffee Tables
- Product: Oak coffee table
- Product: Oak coffee table, glass top
- Branch: Chairs
- Leaf: Dining Chairs
- Product: Oak dining chair
- Product: Oak dining chair, with arms
- Leaf: Office Chairs
- Product: Computer chair
- Product: Computer chair, reclining
