Each record of the table describes a relation between an item and a category, or between a category and another category. The member of a category is stored in the child column, and the category is stored in the parent column.
For example, the hierarchy that is shown in Figure 1 can be represented by the following two non-recursive category maps:
Child | Parent |
---|---|
Orange Juice | Beverages |
Beer | Beverages |
Tomato | Vegetables |
Cabbage | Vegetables |
Carrot | Vegetables |
Child | Parent |
---|---|
Beverages | Food |
Vegetables | Food |
The same hierarchy can also be represented by the following recursive category map:
Child | Parent |
---|---|
Orange Juice | Beverages |
Beer | Beverages |
Tomato | Vegetables |
Cabbage | Vegetables |
Carrot | Vegetables |
Beverages | Food |
Vegetables | Food |