· 8 years ago · Mar 28, 2018, 02:40 AM
1-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
2--
3-- Host: localhost Database: challenge_final
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: `challenge_final`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `challenge_final` /*!40100 DEFAULT CHARACTER SET latin1 */;
23
24USE `challenge_final`;
25
26--
27-- Table structure for table `Ecole`
28--
29
30DROP TABLE IF EXISTS `Ecole`;
31/*!40101 SET @saved_cs_client = @@character_set_client */;
32/*!40101 SET character_set_client = utf8 */;
33CREATE TABLE `Ecole` (
34 `id` int(11) NOT NULL AUTO_INCREMENT,
35 PRIMARY KEY (`id`),
36 KEY `id` (`id`)
37) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;
38/*!40101 SET character_set_client = @saved_cs_client */;
39
40--
41-- Dumping data for table `Ecole`
42--
43
44LOCK TABLES `Ecole` WRITE;
45/*!40000 ALTER TABLE `Ecole` DISABLE KEYS */;
46INSERT INTO `Ecole` VALUES (1);
47/*!40000 ALTER TABLE `Ecole` ENABLE KEYS */;
48UNLOCK TABLES;
49
50--
51-- Table structure for table `Personnes`
52--
53
54DROP TABLE IF EXISTS `Personnes`;
55/*!40101 SET @saved_cs_client = @@character_set_client */;
56/*!40101 SET character_set_client = utf8 */;
57CREATE TABLE `Personnes` (
58 `id` int(11) NOT NULL AUTO_INCREMENT,
59 `id_ecole` int(11) NOT NULL,
60 `nom` varchar(80) DEFAULT NULL,
61 `prenom` varchar(50) DEFAULT NULL,
62 `adresse` text,
63 `langage` varchar(10) DEFAULT NULL,
64 `fonction` varchar(20) DEFAULT NULL,
65 PRIMARY KEY (`id`),
66 KEY `id_ecole` (`id_ecole`),
67 CONSTRAINT `Personnes_ibfk_1` FOREIGN KEY (`id_ecole`) REFERENCES `Ecole` (`id`)
68) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
69/*!40101 SET character_set_client = @saved_cs_client */;
70
71--
72-- Dumping data for table `Personnes`
73--
74
75LOCK TABLES `Personnes` WRITE;
76/*!40000 ALTER TABLE `Personnes` DISABLE KEYS */;
77INSERT INTO `Personnes` VALUES (1,1,'Alphabet','Google','GooglePlex - Californie',NULL,'Formateur'),(2,1,'Pester','Lorie','',NULL,NULL),(3,1,'Crémier','Léa',NULL,'PHP','Eleve'),(4,1,'Broteille','Coralie','haha','JS','Eleve'),(5,1,'Vantours','Ludwig','bdx','JS','Eleve'),(6,1,'Barbier','Aurélien',NULL,'PHP','Formateur'),(7,1,'Thavot','Claire','gresfgqeth','JS','Eleve'),(8,1,'Machin','Bidule','on ne sait où','PHP','Eleve'),(9,1,'Truc','Machin','greoigho','PHP','Eleve'),(10,1,'Jai-plus-didees','nfrgiqe','glngkne','PHP','Eleve');
78/*!40000 ALTER TABLE `Personnes` ENABLE KEYS */;
79UNLOCK TABLES;
80
81--
82-- Table structure for table `Reservations`
83--
84
85DROP TABLE IF EXISTS `Reservations`;
86/*!40101 SET @saved_cs_client = @@character_set_client */;
87/*!40101 SET character_set_client = utf8 */;
88CREATE TABLE `Reservations` (
89 `date_reservation` date NOT NULL,
90 `duree` time NOT NULL,
91 `id_personne` int(11) NOT NULL,
92 `id_salle` int(11) NOT NULL,
93 PRIMARY KEY (`id_personne`,`id_salle`),
94 KEY `id_personne` (`id_personne`),
95 KEY `id_salle` (`id_salle`),
96 CONSTRAINT `Reservations_ibfk_1` FOREIGN KEY (`id_personne`) REFERENCES `Personnes` (`id`),
97 CONSTRAINT `Reservations_ibfk_2` FOREIGN KEY (`id_salle`) REFERENCES `Salles` (`id`)
98) ENGINE=InnoDB DEFAULT CHARSET=latin1;
99/*!40101 SET character_set_client = @saved_cs_client */;
100
101--
102-- Dumping data for table `Reservations`
103--
104
105LOCK TABLES `Reservations` WRITE;
106/*!40000 ALTER TABLE `Reservations` DISABLE KEYS */;
107INSERT INTO `Reservations` VALUES ('2018-03-28','00:47:00',1,6),('2018-03-06','04:23:00',2,6),('2018-03-13','13:00:00',3,1),('2018-03-09','02:00:00',4,6),('2018-03-30','04:00:00',5,1),('2018-03-11','01:00:00',6,1),('2018-04-01','00:29:00',7,4),('2018-03-31','01:00:00',8,6),('2018-03-01','03:00:00',9,4),('2018-03-19','05:00:00',10,3);
108/*!40000 ALTER TABLE `Reservations` ENABLE KEYS */;
109UNLOCK TABLES;
110
111--
112-- Table structure for table `Salles`
113--
114
115DROP TABLE IF EXISTS `Salles`;
116/*!40101 SET @saved_cs_client = @@character_set_client */;
117/*!40101 SET character_set_client = utf8 */;
118CREATE TABLE `Salles` (
119 `id` int(11) NOT NULL AUTO_INCREMENT,
120 `id_ecole` int(11) NOT NULL,
121 `nom` varchar(20) DEFAULT NULL,
122 PRIMARY KEY (`id`),
123 KEY `id_ecole` (`id_ecole`),
124 CONSTRAINT `Salles_ibfk_1` FOREIGN KEY (`id_ecole`) REFERENCES `Ecole` (`id`)
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
132LOCK TABLES `Salles` WRITE;
133/*!40000 ALTER TABLE `Salles` DISABLE KEYS */;
134INSERT INTO `Salles` VALUES (1,1,'Salle de dojo'),(2,1,'Salle de réunion'),(3,1,'Salle de repos'),(4,1,'Bureau'),(5,1,'Cuisine'),(6,1,'OpenSpace');
135/*!40000 ALTER TABLE `Salles` ENABLE KEYS */;
136UNLOCK 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-03-19 17:56:42