· 8 years ago · Mar 27, 2018, 06:50 PM
1-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
2--
3-- Host: localhost Database: Reservation
4-- ------------------------------------------------------
5-- Server version 5.7.21-0ubuntu0.17.10.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: `Reservation`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `Reservation` /*!40100 DEFAULT CHARACTER SET utf8 */;
23
24USE `Reservation`;
25
26--
27-- Table structure for table `formateur`
28--
29
30DROP TABLE IF EXISTS `formateur`;
31/*!40101 SET @saved_cs_client = @@character_set_client */;
32/*!40101 SET character_set_client = utf8 */;
33CREATE TABLE `formateur` (
34 `id` int(11) NOT NULL AUTO_INCREMENT,
35 `firstname` varchar(32) DEFAULT NULL,
36 `lastname` varchar(32) DEFAULT NULL,
37 `language` int(11) DEFAULT NULL,
38 PRIMARY KEY (`id`)
39) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
40/*!40101 SET character_set_client = @saved_cs_client */;
41
42--
43-- Dumping data for table `formateur`
44--
45
46LOCK TABLES `formateur` WRITE;
47/*!40000 ALTER TABLE `formateur` DISABLE KEYS */;
48INSERT INTO `formateur` VALUES (1,'Gaëtan','Rolé-Dubruille',1),(2,'Lucas','Vancompernolle',2);
49/*!40000 ALTER TABLE `formateur` ENABLE KEYS */;
50UNLOCK TABLES;
51
52--
53-- Table structure for table `reservation`
54--
55
56DROP TABLE IF EXISTS `reservation`;
57/*!40101 SET @saved_cs_client = @@character_set_client */;
58/*!40101 SET character_set_client = utf8 */;
59CREATE TABLE `reservation` (
60 `id` int(11) NOT NULL AUTO_INCREMENT,
61 `date` date DEFAULT NULL,
62 `durée` int(11) DEFAULT NULL,
63 `salle_id` int(11) NOT NULL,
64 `wilder_id` int(11) DEFAULT NULL,
65 `formateur_id` int(11) DEFAULT NULL,
66 PRIMARY KEY (`id`),
67 KEY `fk_reservation_salle_idx` (`salle_id`),
68 KEY `fk_reservation_wilder1_idx` (`wilder_id`),
69 KEY `fk_reservation_formateur1_idx` (`formateur_id`),
70 CONSTRAINT `fk_reservation_formateur1` FOREIGN KEY (`formateur_id`) REFERENCES `formateur` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
71 CONSTRAINT `fk_reservation_salle` FOREIGN KEY (`salle_id`) REFERENCES `salle` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
72 CONSTRAINT `fk_reservation_wilder1` FOREIGN KEY (`wilder_id`) REFERENCES `wilder` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
73) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
74/*!40101 SET character_set_client = @saved_cs_client */;
75
76--
77-- Dumping data for table `reservation`
78--
79
80LOCK TABLES `reservation` WRITE;
81/*!40000 ALTER TABLE `reservation` DISABLE KEYS */;
82INSERT INTO `reservation` VALUES (2,'2018-03-18',1,1,2,NULL),(3,'2018-03-18',1,1,3,NULL),(4,'2018-03-19',1,1,4,NULL),(5,'2018-03-18',1,5,5,NULL),(6,'2018-03-18',2,5,NULL,2),(7,'2018-03-18',3,3,NULL,1),(8,'2018-03-18',1,6,1,NULL),(9,'2018-03-18',2,6,6,NULL),(10,'2018-03-21',3,6,7,NULL),(11,'2018-03-22',1,6,8,NULL);
83/*!40000 ALTER TABLE `reservation` ENABLE KEYS */;
84UNLOCK TABLES;
85
86--
87-- Table structure for table `salle`
88--
89
90DROP TABLE IF EXISTS `salle`;
91/*!40101 SET @saved_cs_client = @@character_set_client */;
92/*!40101 SET character_set_client = utf8 */;
93CREATE TABLE `salle` (
94 `id` int(11) NOT NULL AUTO_INCREMENT,
95 `name` varchar(32) DEFAULT NULL,
96 PRIMARY KEY (`id`)
97) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
98/*!40101 SET character_set_client = @saved_cs_client */;
99
100--
101-- Dumping data for table `salle`
102--
103
104LOCK TABLES `salle` WRITE;
105/*!40000 ALTER TABLE `salle` DISABLE KEYS */;
106INSERT INTO `salle` VALUES (1,'Salle de dojo'),(2,'Salle de réunion'),(3,'Salle de repos'),(4,'Cuisine'),(5,'Bureau'),(6,'OpenSpace');
107/*!40000 ALTER TABLE `salle` ENABLE KEYS */;
108UNLOCK TABLES;
109
110--
111-- Table structure for table `wilder`
112--
113
114DROP TABLE IF EXISTS `wilder`;
115/*!40101 SET @saved_cs_client = @@character_set_client */;
116/*!40101 SET character_set_client = utf8 */;
117CREATE TABLE `wilder` (
118 `id` int(11) NOT NULL AUTO_INCREMENT,
119 `firstname` varchar(32) DEFAULT NULL,
120 `lastname` varchar(32) DEFAULT NULL,
121 `address` varchar(128) DEFAULT NULL,
122 PRIMARY KEY (`id`)
123) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
124/*!40101 SET character_set_client = @saved_cs_client */;
125
126--
127-- Dumping data for table `wilder`
128--
129
130LOCK TABLES `wilder` WRITE;
131/*!40000 ALTER TABLE `wilder` DISABLE KEYS */;
132INSERT INTO `wilder` VALUES (1,'Sylvain','Lombaert','Haulchin'),(2,'Thibault','Serre','Lille'),(3,'Cannelle','Legrand','Lille'),(4,'Goo','Gle','Californie'),(5,'Laurie','Ma meilleure','Amie'),(6,'Thomas','Copin','Lille'),(7,'Aurélien','Martin','Roubaix'),(8,'Julien','Lemaire','Lambersart');
133/*!40000 ALTER TABLE `wilder` ENABLE KEYS */;
134UNLOCK TABLES;
135/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
136
137/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
138/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
139/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
140/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
141/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
142/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
143/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
144
145-- Dump completed on 2018-03-19 12:17:19