MySQL stored procedures for creating and managing category trees.