Guest User

Untitled

a guest
Apr 22nd, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.35 KB | None | 0 0
  1. -- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
  2. --
  3. -- Host: localhost Database: WildCoSchool
  4. -- ------------------------------------------------------
  5. -- Server version 5.7.21-0ubuntu0.16.04.1
  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: `WildCoSchool`
  20. --
  21.  
  22. CREATE DATABASE /*!32312 IF NOT EXISTS*/ `WildCoSchool` /*!40100 DEFAULT CHARACTER SET latin1 */;
  23.  
  24. USE `WildCoSchool`;
  25.  
  26. --
  27. -- Table structure for table `students`
  28. --
  29.  
  30. DROP TABLE IF EXISTS `students`;
  31. /*!40101 SET @saved_cs_client = @@character_set_client */;
  32. /*!40101 SET character_set_client = utf8 */;
  33. CREATE TABLE `students` (
  34. `id` int(11) NOT NULL AUTO_INCREMENT,
  35. `name` varchar(50) DEFAULT NULL,
  36. `adress` varchar(50) DEFAULT NULL,
  37. `id_formateur` int(11) DEFAULT NULL,
  38. PRIMARY KEY (`id`),
  39. KEY `id_formateur` (`id_formateur`),
  40. CONSTRAINT `students_ibfk_1` FOREIGN KEY (`id_formateur`) REFERENCES `nosFormateurs` (`id`)
  41. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
  42. /*!40101 SET character_set_client = @saved_cs_client */;
  43.  
  44. --
  45. -- Dumping data for table `students`
  46. --
  47.  
  48. LOCK TABLES `students` WRITE;
  49. /*!40000 ALTER TABLE `students` DISABLE KEYS */;
  50. INSERT INTO `students` VALUES (1,'lemecamadroite','Cannejan',1),(2,'letypedevant','Issykesmoulineux',1),(3,'lafillelabas','limoges',2),(4,'lesautres','voila',2),(5,'voila','voila',1);
  51. /*!40000 ALTER TABLE `students` ENABLE KEYS */;
  52. UNLOCK TABLES;
  53.  
  54. --
  55. -- Table structure for table `nosFormateurs`
  56. --
  57.  
  58. DROP TABLE IF EXISTS `nosFormateurs`;
  59. /*!40101 SET @saved_cs_client = @@character_set_client */;
  60. /*!40101 SET character_set_client = utf8 */;
  61. CREATE TABLE `nosFormateurs` (
  62. `id` int(11) NOT NULL AUTO_INCREMENT,
  63. `name` varchar(50) DEFAULT NULL,
  64. `language` varchar(50) DEFAULT NULL,
  65. `num_salles` int(11) DEFAULT NULL,
  66. PRIMARY KEY (`id`),
  67. KEY `num_salles` (`num_salles`),
  68. CONSTRAINT `nosFormateurs_ibfk_1` FOREIGN KEY (`num_salles`) REFERENCES `salles` (`num_salles`)
  69. ) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
  70. /*!40101 SET character_set_client = @saved_cs_client */;
  71.  
  72. --
  73. -- Dumping data for table `nosFormateurs`
  74. --
  75.  
  76. LOCK TABLES `nosFormateurs` WRITE;
  77. /*!40000 ALTER TABLE `nosFormateurs` DISABLE KEYS */;
  78. INSERT INTO `nosFormateurs` VALUES (1,'Alex','JS',1),(2,'Luigi','Php',1),(3,'Toad','Js',5),(4,'Yoshi','Js',6),(5,'Voila','js',6),(6,'Ok','js',5),(7,'Rocket','Php',1),(8,'Warrio','Js',3),(9,'Mulan','php',6),(10,'Hector','Js',6);
  79. /*!40000 ALTER TABLE `nosFormateurs` ENABLE KEYS */;
  80. UNLOCK TABLES;
  81.  
  82. --
  83. -- Table structure for table `reservation`
  84. --
  85.  
  86. DROP TABLE IF EXISTS `reservation`;
  87. /*!40101 SET @saved_cs_client = @@character_set_client */;
  88. /*!40101 SET character_set_client = utf8 */;
  89. CREATE TABLE `reservation` (
  90. `id` int(11) NOT NULL AUTO_INCREMENT,
  91. `date` varchar(5) DEFAULT NULL,
  92. `heure` varchar(5) DEFAULT NULL,
  93. `duration` int(11) DEFAULT NULL,
  94. `salles_id` int(11) DEFAULT NULL,
  95. `formateur_id` int(11) DEFAULT NULL,
  96. PRIMARY KEY (`id`),
  97. KEY `salles_id` (`salles_id`),
  98. KEY `formateur_id` (`formateur_id`),
  99. CONSTRAINT `reservation_ibfk_1` FOREIGN KEY (`salles_id`) REFERENCES `salles` (`num_salles`),
  100. CONSTRAINT `reservation_ibfk_2` FOREIGN KEY (`formateur_id`) REFERENCES `nosFormateurs` (`id`)
  101. ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
  102. /*!40101 SET character_set_client = @saved_cs_client */;
  103.  
  104. --
  105. -- Dumping data for table `reservation`
  106. --
  107.  
  108. LOCK TABLES `reservation` WRITE;
  109. /*!40000 ALTER TABLE `reservation` DISABLE KEYS */;
  110. INSERT INTO `reservation` VALUES (1,'07/04','10h00',180,1,1),(2,'02/04','17h30',2,1,1),(3,'08/04','9h33',57,5,3),(4,'03/04','19h00',10,1,2),(5,'03/04','13h00',60,3,1);
  111. /*!40000 ALTER TABLE `reservation` ENABLE KEYS */;
  112. UNLOCK TABLES;
  113.  
  114. --
  115. -- Table structure for table `salles`
  116. --
  117.  
  118. DROP TABLE IF EXISTS `salles`;
  119. /*!40101 SET @saved_cs_client = @@character_set_client */;
  120. /*!40101 SET character_set_client = utf8 */;
  121. CREATE TABLE `salles` (
  122. `num_salles` int(11) NOT NULL AUTO_INCREMENT,
  123. `name_salles` varchar(50) DEFAULT NULL,
  124. PRIMARY KEY (`num_salles`)
  125. ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
  126. /*!40101 SET character_set_client = @saved_cs_client */;
  127.  
  128. --
  129. -- Dumping data for table `salles`
  130. --
  131.  
  132. LOCK TABLES `salles` WRITE;
  133. /*!40000 ALTER TABLE `salles` DISABLE KEYS */;
  134. INSERT INTO `salles` VALUES (1,'Dojo'),(2,'Salles de reunion'),(3,'BatCave'),(4,'Cuisinella'),(5,'Office'),(6,'OpenSpace');
  135. /*!40000 ALTER TABLE `salles` ENABLE KEYS */;
  136. UNLOCK TABLES;
  137. /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  138.  
  139. /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  140. /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  141. /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  142. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  143. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  144. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  145. /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  146.  
  147. -- Dump completed on 2018-04-14 14:01:02
Add Comment
Please, Sign In to add comment