Categories aren't shared, but the structure of the trees can be the same for two users. Meaning that there is a possibility for both user X and Y to have two private categories each, one parent category called science and one subcategory called Biology. Theoretically they might both decide to place a third category "Evolution" under their respective Biology categories. All of user A's categories are independant of users B's categories.
I've allowed for an unlimited number of subcategories.
When a user tries to create a category, I want to first check if that user already has an identical category in a given parent category (this parent category also belonging to him.) How do I do this?