First off, you do not need to worry about these columns in the db, these are taken care of by magic. Once you learn how to read it, it comes in handy for checking nestings...
I have these five categories
Cars
Fruit
- Apple
- - Green
- Banana
Cars would be {lft:1} , it has no sub-categories, so Cars is {rgt:2},
Next is Fruit, {lft:3}, this does have a nested category, so rgt has to wait
Next is Apple, this is {lft:4}, it too has a nested category, so...
Green is {lft:5}. Green also has {rgt:6}.
That is the end of Apple's sub categories, so now Apple can be closed off {rgt:7},
Banana is next {lft:8}, {rgt:9} and then close of Fruit {rgt:10}
It makes sense to me because I wrote it. Hope that makes sense to whoever wants to know it.