· 8 years ago · Apr 12, 2018, 09:30 AM
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 latin1 */;
23
24USE `reservation`;
25
26--
27-- Table structure for table `eleves`
28--
29
30DROP TABLE IF EXISTS `eleves`;
31/*!40101 SET @saved_cs_client = @@character_set_client */;
32/*!40101 SET character_set_client = utf8 */;
33CREATE TABLE `eleves` (
34 `id` int(11) NOT NULL AUTO_INCREMENT,
35 `prenom` varchar(32) DEFAULT NULL,
36 `nom` varchar(32) DEFAULT NULL,
37 `adresse` text,
38 `dossier` int(11) DEFAULT NULL,
39 `eleveID` int(11) NOT NULL,
40 PRIMARY KEY (`id`)
41) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
42/*!40101 SET character_set_client = @saved_cs_client */;
43
44--
45-- Dumping data for table `eleves`
46--
47
48LOCK TABLES `eleves` WRITE;
49/*!40000 ALTER TABLE `eleves` DISABLE KEYS */;
50INSERT INTO `eleves` VALUES (1,'Maxence','Delaine','Peumerit-Quintin',69,0),(2,'Nezzar','Kefif','Dans les internet',7,0),(3,'Grégoire','Louise','Au comptoir du bistrot',1664,0),(4,'Alexandre','Benard','au Basic-Fit du coin',42,0),(5,'Kevin','Debranbadere','Envie de Saison',96,0),(6,'Lucas','Poirier','Hellfest',666,0),(7,'Louis','Bruge','Au fond du trou avec un pinceau',1492,0),(8,'Bruce','Wayne','Gotham',888,0),(9,'Google','Johnson','Dans ton pc',2000,0),(10,'Laure','Pester','TF1',111,0);
51/*!40000 ALTER TABLE `eleves` ENABLE KEYS */;
52UNLOCK TABLES;
53
54--
55-- Table structure for table `formateurs`
56--
57
58DROP TABLE IF EXISTS `formateurs`;
59/*!40101 SET @saved_cs_client = @@character_set_client */;
60/*!40101 SET character_set_client = utf8 */;
61CREATE TABLE `formateurs` (
62 `id` int(11) NOT NULL AUTO_INCREMENT,
63 `prenom` varchar(32) DEFAULT NULL,
64 `nom` varchar(32) DEFAULT NULL,
65 `dossier` int(11) DEFAULT NULL,
66 `langage` varchar(16) DEFAULT NULL,
67 PRIMARY KEY (`id`)
68) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
69/*!40101 SET character_set_client = @saved_cs_client */;
70
71--
72-- Dumping data for table `formateurs`
73--
74
75LOCK TABLES `formateurs` WRITE;
76/*!40000 ALTER TABLE `formateurs` DISABLE KEYS */;
77INSERT INTO `formateurs` VALUES (1,'Gaetan','Fraudeur',6666,'PHP'),(2,'Lucascript','Klepto',0,'Javascript');
78/*!40000 ALTER TABLE `formateurs` ENABLE KEYS */;
79UNLOCK TABLES;
80
81--
82-- Table structure for table `reservation`
83--
84
85DROP TABLE IF EXISTS `reservation`;
86/*!40101 SET @saved_cs_client = @@character_set_client */;
87/*!40101 SET character_set_client = utf8 */;
88CREATE TABLE `reservation` (
89 `id` int(11) NOT NULL AUTO_INCREMENT,
90 `date` date DEFAULT NULL,
91 `salleID` int(11) NOT NULL,
92 `userID` int(11) NOT NULL,
93 `duree` time DEFAULT NULL,
94 PRIMARY KEY (`id`),
95 KEY `fk_salle_id` (`salleID`),
96 KEY `fk_user_id` (`userID`),
97 CONSTRAINT `fk_salle_id` FOREIGN KEY (`salleID`) REFERENCES `salle` (`id`),
98 CONSTRAINT `fk_user_id` FOREIGN KEY (`userID`) REFERENCES `eleves` (`id`)
99) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
100/*!40101 SET character_set_client = @saved_cs_client */;
101
102--
103-- Dumping data for table `reservation`
104--
105
106LOCK TABLES `reservation` WRITE;
107/*!40000 ALTER TABLE `reservation` DISABLE KEYS */;
108INSERT INTO `reservation` VALUES (1,'2018-04-04',1,1,'02:00:00'),(2,'2018-04-04',1,2,'02:00:00'),(3,'2018-04-04',1,10,'02:00:00'),(4,'2018-04-04',5,3,'04:00:00'),(5,'2018-04-04',5,5,'04:00:00'),(6,'2018-04-04',3,8,'12:00:00'),(7,'2018-04-04',6,4,'05:00:00'),(8,'2018-04-04',6,6,'05:00:00'),(9,'2018-04-04',6,7,'05:00:00'),(10,'2018-04-04',6,9,'05:00:00');
109/*!40000 ALTER TABLE `reservation` ENABLE KEYS */;
110UNLOCK TABLES;
111
112--
113-- Table structure for table `salle`
114--
115
116DROP TABLE IF EXISTS `salle`;
117/*!40101 SET @saved_cs_client = @@character_set_client */;
118/*!40101 SET character_set_client = utf8 */;
119CREATE TABLE `salle` (
120 `id` int(11) NOT NULL AUTO_INCREMENT,
121 `nom` varchar(32) DEFAULT NULL,
122 PRIMARY KEY (`id`)
123) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
124/*!40101 SET character_set_client = @saved_cs_client */;
125
126--
127-- Dumping data for table `salle`
128--
129
130LOCK TABLES `salle` WRITE;
131/*!40000 ALTER TABLE `salle` DISABLE KEYS */;
132INSERT INTO `salle` VALUES (1,'Salle de dojo'),(2,'Salle de réunion'),(3,'Salle de repos'),(4,'Cuisine'),(5,'Bureau'),(6,'OpenSpace');
133/*!40000 ALTER TABLE `salle` 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-04-04 12:04:09