· 8 years ago · Nov 21, 2017, 08:10 PM
1-- MySQL dump 10.13 Distrib 5.7.20, for Linux (x86_64)
2--
3-- Host: localhost Database: WCS
4-- ------------------------------------------------------
5-- Server version 5.7.20-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: `WCS`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `WCS` /*!40100 DEFAULT CHARACTER SET latin1 */;
23
24USE `WCS`;
25
26--
27-- Table structure for table `langage`
28--
29
30DROP TABLE IF EXISTS `langage`;
31/*!40101 SET @saved_cs_client = @@character_set_client */;
32/*!40101 SET character_set_client = utf8 */;
33CREATE 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=4 DEFAULT CHARSET=latin1;
38/*!40101 SET character_set_client = @saved_cs_client */;
39
40--
41-- Dumping data for table `langage`
42--
43
44LOCK TABLES `langage` WRITE;
45/*!40000 ALTER TABLE `langage` DISABLE KEYS */;
46INSERT INTO `langage` VALUES (1,'php'),(2,'js'),(3,'ruby');
47/*!40000 ALTER TABLE `langage` ENABLE KEYS */;
48UNLOCK TABLES;
49
50--
51-- Table structure for table `personne`
52--
53
54DROP TABLE IF EXISTS `personne`;
55/*!40101 SET @saved_cs_client = @@character_set_client */;
56/*!40101 SET character_set_client = utf8 */;
57CREATE TABLE `personne` (
58 `id` int(11) NOT NULL AUTO_INCREMENT,
59 `nom` varchar(50) DEFAULT NULL,
60 `prenom` varchar(50) 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=11 DEFAULT CHARSET=latin1;
66/*!40101 SET character_set_client = @saved_cs_client */;
67
68--
69-- Dumping data for table `personne`
70--
71
72LOCK TABLES `personne` WRITE;
73/*!40000 ALTER TABLE `personne` DISABLE KEYS */;
74INSERT INTO `personne` VALUES (1,'Laurie','Ingalls',1),(2,'Yaya','Dacosta',2),(3,'Lupita','Nyongo',1),(4,'Viola','Davis',2),(5,'Lauryn','Hill',1),(6,'Janelle','Monae',2),(7,'Google','Freeman',1),(8,'Denzel','Washington',2),(9,'Will','Smith',1),(10,'Elie','Moise',2);
75/*!40000 ALTER TABLE `personne` ENABLE KEYS */;
76UNLOCK TABLES;
77
78--
79-- Table structure for table `personne_langage`
80--
81
82DROP TABLE IF EXISTS `personne_langage`;
83/*!40101 SET @saved_cs_client = @@character_set_client */;
84/*!40101 SET character_set_client = utf8 */;
85CREATE 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=latin1;
93/*!40101 SET character_set_client = @saved_cs_client */;
94
95--
96-- Dumping data for table `personne_langage`
97--
98
99LOCK TABLES `personne_langage` WRITE;
100/*!40000 ALTER TABLE `personne_langage` DISABLE KEYS */;
101/*!40000 ALTER TABLE `personne_langage` ENABLE KEYS */;
102UNLOCK TABLES;
103
104--
105-- Table structure for table `reservation`
106--
107
108DROP TABLE IF EXISTS `reservation`;
109/*!40101 SET @saved_cs_client = @@character_set_client */;
110/*!40101 SET character_set_client = utf8 */;
111CREATE 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=latin1;
122/*!40101 SET character_set_client = @saved_cs_client */;
123
124--
125-- Dumping data for table `reservation`
126--
127
128LOCK TABLES `reservation` WRITE;
129/*!40000 ALTER TABLE `reservation` DISABLE KEYS */;
130INSERT INTO `reservation` VALUES (2,'2017-11-20 09:30:00',1,2),(3,'2017-11-20 11:30:00',1,3),(4,'2017-11-21 13:00:00',1,1),(5,'2017-11-22 09:30:00',5,4),(6,'2017-11-22 15:00:00',5,5),(7,'2017-11-23 11:00:00',3,6),(8,'2017-11-23 11:30:00',6,7),(9,'2017-11-23 17:30:00',6,8),(10,'2017-11-24 10:30:00',6,9),(11,'2017-11-25 16:00:00',6,10);
131/*!40000 ALTER TABLE `reservation` ENABLE KEYS */;
132UNLOCK TABLES;
133
134--
135-- Table structure for table `role`
136--
137
138DROP TABLE IF EXISTS `role`;
139/*!40101 SET @saved_cs_client = @@character_set_client */;
140/*!40101 SET character_set_client = utf8 */;
141CREATE 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=latin1;
146/*!40101 SET character_set_client = @saved_cs_client */;
147
148--
149-- Dumping data for table `role`
150--
151
152LOCK TABLES `role` WRITE;
153/*!40000 ALTER TABLE `role` DISABLE KEYS */;
154INSERT INTO `role` VALUES (1,'eleve'),(2,'formateur');
155/*!40000 ALTER TABLE `role` ENABLE KEYS */;
156UNLOCK TABLES;
157
158--
159-- Table structure for table `salle`
160--
161
162DROP TABLE IF EXISTS `salle`;
163/*!40101 SET @saved_cs_client = @@character_set_client */;
164/*!40101 SET character_set_client = utf8 */;
165CREATE 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=latin1;
170/*!40101 SET character_set_client = @saved_cs_client */;
171
172--
173-- Dumping data for table `salle`
174--
175
176LOCK TABLES `salle` WRITE;
177/*!40000 ALTER TABLE `salle` DISABLE KEYS */;
178INSERT INTO `salle` VALUES (1,'dojo'),(2,'reunion'),(3,'repos'),(4,'cuisine'),(5,'bureau'),(6,'openspace');
179/*!40000 ALTER TABLE `salle` ENABLE KEYS */;
180UNLOCK 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-20 11:22:15