Let\'s say I have 3 tables (significant columns only) Category (catId key, parentCatId) Category_Hierarchy (catId key, parentTrail, catLevel)