ctreeview relation in the same table

hi @all !

i just implemented a ctreeview from this tutorial :

http://www.yiiframework.com/wiki/70/display-an-ajax-tree-from-your-db-using-ctreeview/

my table is the following :


CREATE TABLE IF NOT EXISTS `menu` (

  `id` int(11) NOT NULL AUTO_INCREMENT,

  `name` varchar(48) DEFAULT NULL,

  `parent_id` int(10) unsigned DEFAULT NULL,

.....

But is it possible to tell yii "there is a parent<->haschilds relation" so when a parent is removed, yii will auto-remove the childs ?

or is there an extension that provide an ajax vertical menu that supports unlimited subcategories + admin management ?

is it possible to get an HTML selectlist that contains unlimited childs using the same SQL table as above with only 1 SQL query ?

Or is it an SQL impossible query ?

I mean the same selectlist as in this forum (the one we use to jump to another forum category)