Thanks, but it doesn't solve my problem.
I have two categories:
Inside these categories I have several fixed subcategories.
I want the users to be able to add new subcategories, as long as they identify to which of the 2 categories above they belong to.
I thought about organising a table with hierarchy as per your example, but it doesn't seem possible to do as I'm unable to identify to which of the 2 categories a new subcategory belongs.
An alternative would be 2 tables (one for each category) but it doesn't look good.