Guest User

nodes and closure dump

a guest
Feb 10th, 2011
254
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
MySQL 2.70 KB | None | 0 0
  1. --
  2. -- Table structure for table `nodes`
  3. --
  4.  
  5. DROP TABLE IF EXISTS `nodes`;
  6. SET @saved_cs_client     = @@character_set_client;
  7. SET character_set_client = utf8;
  8. CREATE TABLE `nodes` (
  9.   `node` int(11) NOT NULL auto_increment,
  10.   `label` varchar(20) collate utf8_estonian_ci NOT NULL,
  11.   `time` datetime default NULL,
  12.   PRIMARY KEY  (`node`)
  13. ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_estonian_ci;
  14. SET character_set_client = @saved_cs_client;
  15.  
  16. --
  17. -- Dumping data for table `nodes`
  18. --
  19.  
  20. LOCK TABLES `nodes` WRITE;
  21. /*!40000 ALTER TABLE `nodes` DISABLE KEYS */;
  22. INSERT INTO `nodes` VALUES (1,'first','2011-02-10 12:24:37'),(2,'re: first','2011-02-10 12:25:42'),(3,'third','2011-02-10 12:26:48'),(4,'re: third','2011-02-10 12:27:15'),(5,'re: fourth','2011-02-10 12:27:48'),(6,'re: third','2011-02-10 12:28:53'),(7,'re: first','2011-02-10 12:29:27'),(8,'re: second','2011-02-10 12:29:52'),(9,'ninth','2011-02-10 15:47:59'),(10,'tenth','2011-02-10 15:47:59'),(11,'eleventh','2011-02-10 15:47:59'),(12,'re: ninth','2011-02-10 15:48:27'),(13,'re: eleventh','2011-02-10 15:49:20'),(14,'re: tenth','2011-02-10 15:50:20'),(15,'re: 8th','2011-02-10 15:51:51'),(16,'re: 8th','2011-02-10 15:52:13'),(17,'re: 2nd','2011-02-10 15:57:46');
  23. /*!40000 ALTER TABLE `nodes` ENABLE KEYS */;
  24. UNLOCK TABLES;
  25.  
  26.  
  27. --
  28. -- Table structure for table `closure`
  29. --
  30.  
  31. DROP TABLE IF EXISTS `closure`;
  32. SET @saved_cs_client     = @@character_set_client;
  33. SET character_set_client = utf8;
  34. CREATE TABLE `closure` (
  35.   `ancestor` int(11) NOT NULL,
  36.   `descendant` int(11) NOT NULL,
  37.   `depth` tinyint(3) unsigned default NULL,
  38.   `depth_from_root` tinyint(3) unsigned default NULL,
  39.   PRIMARY KEY  (`ancestor`,`descendant`),
  40.   KEY `descendant` (`descendant`),
  41.   CONSTRAINT `closure_ibfk_1` FOREIGN KEY (`ancestor`) REFERENCES `nodes` (`node`),
  42.   CONSTRAINT `closure_ibfk_2` FOREIGN KEY (`descendant`) REFERENCES `nodes` (`node`)
  43. ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_estonian_ci;
  44. SET character_set_client = @saved_cs_client;
  45.  
  46. --
  47. -- Dumping data for table `closure`
  48. --
  49.  
  50. LOCK TABLES `closure` WRITE;
  51. /*!40000 ALTER TABLE `closure` DISABLE KEYS */;
  52. INSERT INTO `closure` VALUES (1,1,0,NULL),(1,2,1,NULL),(1,7,1,NULL),(1,8,2,NULL),(1,15,3,NULL),(1,16,3,NULL),(1,17,2,NULL),(2,2,0,NULL),(2,8,1,NULL),(2,15,2,NULL),(2,16,2,NULL),(2,17,1,NULL),(3,3,0,NULL),(3,4,1,NULL),(3,5,2,NULL),(3,6,1,NULL),(4,4,0,NULL),(4,5,1,NULL),(5,5,0,NULL),(6,6,0,NULL),(7,7,0,NULL),(8,8,0,NULL),(8,15,1,NULL),(8,16,1,NULL),(9,9,0,NULL),(9,12,1,NULL),(10,10,0,NULL),(10,14,1,NULL),(11,11,0,NULL),(11,13,1,NULL),(12,12,0,NULL),(13,13,0,NULL),(14,14,0,NULL),(15,15,0,NULL),(16,16,0,NULL),(17,17,0,NULL);
  53. /*!40000 ALTER TABLE `closure` ENABLE KEYS */;
  54. UNLOCK TABLES;
Add Comment
Please, Sign In to add comment