| 
#
# Table structure for table `tree`
 #
 
 CREATE TABLE `tree` (
 `NodeId` int(11) NOT NULL auto_increment,
 `ParentId` int(11) NOT NULL default '1',
 `NodeName` varchar(20) NOT NULL,
 `Left` int(11) NOT NULL,
 `Right` int(11) NOT NULL,
 PRIMARY KEY  (`NodeId`),
 KEY `ParentId` (`ParentId`,`Left`,`Right`)
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;
 
 #
 # Dumping data for table `tree`
 #
 
 INSERT INTO `tree` VALUES (1, 1, 'Food', 1, 18);
 INSERT INTO `tree` VALUES (2, 1, 'Meat', 2, 7);
 INSERT INTO `tree` VALUES (3, 2, 'Beaf', 3, 4);
 INSERT INTO `tree` VALUES (4, 2, 'Fish', 5, 6);
 INSERT INTO `tree` VALUES (5, 1, 'Fruit', 8, 17);
 INSERT INTO `tree` VALUES (6, 5, 'Red', 9, 12);
 INSERT INTO `tree` VALUES (7, 6, 'Apple', 10, 11);
 INSERT INTO `tree` VALUES (8, 5, 'Yellow', 13, 16);
 INSERT INTO `tree` VALUES (9, 8, 'Banana', 14, 15);
 
 |