Guest User

Untitled

a guest
Nov 20th, 2017
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.57 KB | None | 0 0
  1. -- MySQL dump 10.13 Distrib 5.6.35, for osx10.9 (x86_64)
  2. --
  3. -- Host: localhost Database: db_name
  4. -- ------------------------------------------------------
  5. -- Server version 5.6.35
  6.  
  7. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  8. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  9. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  10. /*!40101 SET NAMES utf8 */;
  11. /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  12. /*!40103 SET TIME_ZONE='+00:00' */;
  13. /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  14. /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  15. /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  16. /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  17.  
  18. --
  19. -- Current Database: `db_name`
  20. --
  21.  
  22. CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db_name` /*!40100 DEFAULT CHARACTER SET utf8 */;
  23.  
  24. USE `db_name`;
  25.  
  26. --
  27. -- Table structure for table `langage`
  28. --
  29.  
  30. DROP TABLE IF EXISTS `langage`;
  31. /*!40101 SET @saved_cs_client = @@character_set_client */;
  32. /*!40101 SET character_set_client = utf8 */;
  33. CREATE TABLE `langage` (
  34. `id` int(11) NOT NULL AUTO_INCREMENT,
  35. `nom` varchar(50) DEFAULT NULL,
  36. PRIMARY KEY (`id`)
  37. ) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
  38. /*!40101 SET character_set_client = @saved_cs_client */;
  39.  
  40. --
  41. -- Dumping data for table `langage`
  42. --
  43.  
  44. LOCK TABLES `langage` WRITE;
  45. /*!40000 ALTER TABLE `langage` DISABLE KEYS */;
  46. INSERT INTO `langage` VALUES (1,'php'),(2,'javascript'),(3,'python'),(4,'ruby');
  47. /*!40000 ALTER TABLE `langage` ENABLE KEYS */;
  48. UNLOCK TABLES;
  49.  
  50. --
  51. -- Table structure for table `personne`
  52. --
  53.  
  54. DROP TABLE IF EXISTS `personne`;
  55. /*!40101 SET @saved_cs_client = @@character_set_client */;
  56. /*!40101 SET character_set_client = utf8 */;
  57. CREATE TABLE `personne` (
  58. `id` int(11) NOT NULL AUTO_INCREMENT,
  59. `nom` varchar(100) DEFAULT NULL,
  60. `prenom` varchar(100) DEFAULT NULL,
  61. `role_id` int(11) DEFAULT NULL,
  62. PRIMARY KEY (`id`),
  63. KEY `role_id` (`role_id`),
  64. CONSTRAINT `personne_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `role` (`id`)
  65. ) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
  66. /*!40101 SET character_set_client = @saved_cs_client */;
  67.  
  68. --
  69. -- Dumping data for table `personne`
  70. --
  71.  
  72. LOCK TABLES `personne` WRITE;
  73. /*!40000 ALTER TABLE `personne` DISABLE KEYS */;
  74. INSERT INTO `personne` VALUES (1,'google','teach',2),(2,'Beach','Laurie',2),(3,'Lima','Sara',2),(4,'Montout','Diana',2),(5,'Mouse','Mickey',2),(6,'Trump','Donald',2),(7,'Lepen','Jean Marie',2),(8,'Macron','Emmanuel',2),(9,'Kent','Clark',2),(10,'Willis','Bruce',2),(11,'Grandjean','Florian',1),(12,'www','Internet',1);
  75. /*!40000 ALTER TABLE `personne` ENABLE KEYS */;
  76. UNLOCK TABLES;
  77.  
  78. --
  79. -- Table structure for table `personne_langage`
  80. --
  81.  
  82. DROP TABLE IF EXISTS `personne_langage`;
  83. /*!40101 SET @saved_cs_client = @@character_set_client */;
  84. /*!40101 SET character_set_client = utf8 */;
  85. CREATE TABLE `personne_langage` (
  86. `personne_id` int(11) DEFAULT NULL,
  87. `langage_id` int(11) DEFAULT NULL,
  88. KEY `personne_id` (`personne_id`),
  89. KEY `langage_id` (`langage_id`),
  90. CONSTRAINT `personne_langage_ibfk_1` FOREIGN KEY (`personne_id`) REFERENCES `personne` (`id`),
  91. CONSTRAINT `personne_langage_ibfk_2` FOREIGN KEY (`langage_id`) REFERENCES `langage` (`id`)
  92. ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
  93. /*!40101 SET character_set_client = @saved_cs_client */;
  94.  
  95. --
  96. -- Dumping data for table `personne_langage`
  97. --
  98.  
  99. LOCK TABLES `personne_langage` WRITE;
  100. /*!40000 ALTER TABLE `personne_langage` DISABLE KEYS */;
  101. /*!40000 ALTER TABLE `personne_langage` ENABLE KEYS */;
  102. UNLOCK TABLES;
  103.  
  104. --
  105. -- Table structure for table `reservation`
  106. --
  107.  
  108. DROP TABLE IF EXISTS `reservation`;
  109. /*!40101 SET @saved_cs_client = @@character_set_client */;
  110. /*!40101 SET character_set_client = utf8 */;
  111. CREATE TABLE `reservation` (
  112. `id` int(11) NOT NULL AUTO_INCREMENT,
  113. `date` datetime DEFAULT NULL,
  114. `salle_id` int(11) DEFAULT NULL,
  115. `personne_id` int(11) DEFAULT NULL,
  116. PRIMARY KEY (`id`),
  117. KEY `salle_id` (`salle_id`),
  118. KEY `personne_id` (`personne_id`),
  119. CONSTRAINT `reservation_ibfk_1` FOREIGN KEY (`salle_id`) REFERENCES `salle` (`id`),
  120. CONSTRAINT `reservation_ibfk_2` FOREIGN KEY (`personne_id`) REFERENCES `personne` (`id`)
  121. ) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
  122. /*!40101 SET character_set_client = @saved_cs_client */;
  123.  
  124. --
  125. -- Dumping data for table `reservation`
  126. --
  127.  
  128. LOCK TABLES `reservation` WRITE;
  129. /*!40000 ALTER TABLE `reservation` DISABLE KEYS */;
  130. INSERT INTO `reservation` VALUES (1,'2017-03-03 15:00:00',1,1),(2,'2017-04-03 16:00:00',1,2),(4,'2017-02-03 14:00:00',1,3),(5,'2017-01-03 14:00:00',5,4),(6,'2017-01-05 17:00:00',5,5),(7,'2017-01-09 09:00:00',3,6),(8,'2017-05-09 11:00:00',6,7),(9,'2017-05-09 12:00:00',6,8),(10,'2017-05-12 16:00:00',6,9),(11,'2017-05-12 09:00:00',6,10);
  131. /*!40000 ALTER TABLE `reservation` ENABLE KEYS */;
  132. UNLOCK TABLES;
  133.  
  134. --
  135. -- Table structure for table `role`
  136. --
  137.  
  138. DROP TABLE IF EXISTS `role`;
  139. /*!40101 SET @saved_cs_client = @@character_set_client */;
  140. /*!40101 SET character_set_client = utf8 */;
  141. CREATE TABLE `role` (
  142. `id` int(11) NOT NULL AUTO_INCREMENT,
  143. `nom` varchar(50) DEFAULT NULL,
  144. PRIMARY KEY (`id`)
  145. ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
  146. /*!40101 SET character_set_client = @saved_cs_client */;
  147.  
  148. --
  149. -- Dumping data for table `role`
  150. --
  151.  
  152. LOCK TABLES `role` WRITE;
  153. /*!40000 ALTER TABLE `role` DISABLE KEYS */;
  154. INSERT INTO `role` VALUES (1,'enseignant'),(2,'élève');
  155. /*!40000 ALTER TABLE `role` ENABLE KEYS */;
  156. UNLOCK TABLES;
  157.  
  158. --
  159. -- Table structure for table `salle`
  160. --
  161.  
  162. DROP TABLE IF EXISTS `salle`;
  163. /*!40101 SET @saved_cs_client = @@character_set_client */;
  164. /*!40101 SET character_set_client = utf8 */;
  165. CREATE TABLE `salle` (
  166. `id` int(11) NOT NULL AUTO_INCREMENT,
  167. `nom` varchar(50) DEFAULT NULL,
  168. PRIMARY KEY (`id`)
  169. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
  170. /*!40101 SET character_set_client = @saved_cs_client */;
  171.  
  172. --
  173. -- Dumping data for table `salle`
  174. --
  175.  
  176. LOCK TABLES `salle` WRITE;
  177. /*!40000 ALTER TABLE `salle` DISABLE KEYS */;
  178. INSERT INTO `salle` VALUES (1,'salle de dojo'),(2,'salle de reunion'),(3,'salle de repos'),(4,'cuisine'),(5,'bureau'),(6,'open space');
  179. /*!40000 ALTER TABLE `salle` ENABLE KEYS */;
  180. UNLOCK TABLES;
  181. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  182.  
  183. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  184. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  185. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  186. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  187. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  188. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  189. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  190.  
  191. -- Dump completed on 2017-11-19 15:50:37
Add Comment
Please, Sign In to add comment