Category.cat_root is the cat_id of the root category to which a category belongs. For comparison, Category.cat_root is to categories what Post.post_root_id is to posts.
For examples sake, let's say we have a category structure like this:
(Let's assume for the example that the category ID's are A-1, B-2, C-3, etc.) Now, cat_root will be '0' for root categories - A, F, and G in this example. B, C, D, and E have A as their root category, so their 'cat_root' value will be 1 - the cat_id of A. For B and D, the cat_id_fk value will have the same value since their father category and root category are one and the same. C and E will have 2 and 4 as their father_id_fk values, respectively, and 1 as the cat_root values. H will have both cat_id_fk and cat_root of '7'. cat_depth is easy to see here - A, F, and G have depth of 0; B, D, and H have cat_depth = 1, and C and E have a depth of 2.
In GForum 1.1.2 we moved the nested category handling from a GForum-specific model into our new generic SQL tree handling module, GT::SQL::Tree. We also moved the Post table over to use this new generic tree format (which is why the 'Ancestor' table became 'Post_tree' - there is also a 'Category_tree'). Typically, you shouldn't ever need to worry about the cat_root field - internally, when an update alters cat_id_fk column, the cat_root and cat_depth columns are automatically updated.
This tree module will be useful in other areas as well - I'm trying to convince Adrian to use it for nested folders in GMail.
Jason Rhinelander
Gossamer Threads jason@gossamer-threads.com