· 8 years ago · Apr 18, 2018, 01:42 PM
1-- MySQL dump 10.13 Distrib 5.7.21, for osx10.12 (x86_64)
2--
3-- Host: localhost Database: gregoire_l_wcs_lille
4-- ------------------------------------------------------
5-- Server version 5.7.21
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: `gregoire_l_wcs_lille`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `gregoire_l_wcs_lille` /*!40100 DEFAULT CHARACTER SET utf8 */;
23
24USE `gregoire_l_wcs_lille`;
25
26--
27-- Table structure for table `Reservation`
28--
29
30DROP TABLE IF EXISTS `Reservation`;
31/*!40101 SET @saved_cs_client = @@character_set_client */;
32/*!40101 SET character_set_client = utf8 */;
33CREATE TABLE `Reservation` (
34 `ResaID` int(11) NOT NULL AUTO_INCREMENT,
35 `Date` date DEFAULT NULL,
36 `Duration` int(11) DEFAULT NULL,
37 `infos_ID` int(11) DEFAULT NULL,
38 `Rooms_ID` int(11) DEFAULT NULL,
39 PRIMARY KEY (`ResaID`),
40 KEY `infos_ID` (`infos_ID`),
41 KEY `Rooms_ID` (`Rooms_ID`),
42 CONSTRAINT `reservation_ibfk_1` FOREIGN KEY (`infos_ID`) REFERENCES `infos` (`ID`),
43 CONSTRAINT `reservation_ibfk_2` FOREIGN KEY (`Rooms_ID`) REFERENCES `Rooms` (`ID`)
44) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
45/*!40101 SET character_set_client = @saved_cs_client */;
46
47--
48-- Dumping data for table `Reservation`
49--
50
51LOCK TABLES `Reservation` WRITE;
52/*!40000 ALTER TABLE `Reservation` DISABLE KEYS */;
53INSERT INTO `Reservation` VALUES (1,'2018-04-12',2,1,1),(2,'2018-04-12',2,2,1),(3,'2018-04-12',2,3,1),(4,'2018-04-12',1,4,5),(5,'2018-04-12',1,5,5),(6,'2018-04-12',1,6,3),(7,'2018-04-14',1,7,6),(8,'2018-04-14',1,8,6),(9,'2018-04-14',1,9,6),(10,'2018-04-14',1,10,6);
54/*!40000 ALTER TABLE `Reservation` ENABLE KEYS */;
55UNLOCK TABLES;
56
57--
58-- Table structure for table `Rooms`
59--
60
61DROP TABLE IF EXISTS `Rooms`;
62/*!40101 SET @saved_cs_client = @@character_set_client */;
63/*!40101 SET character_set_client = utf8 */;
64CREATE TABLE `Rooms` (
65 `ID` int(11) NOT NULL AUTO_INCREMENT,
66 `RoomName` varchar(255) DEFAULT NULL,
67 PRIMARY KEY (`ID`)
68) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
69/*!40101 SET character_set_client = @saved_cs_client */;
70
71--
72-- Dumping data for table `Rooms`
73--
74
75LOCK TABLES `Rooms` WRITE;
76/*!40000 ALTER TABLE `Rooms` DISABLE KEYS */;
77INSERT INTO `Rooms` VALUES (1,'Salle de Dojo'),(2,'Salle de Réunion'),(3,'Salle de Repos'),(4,'Cuisine'),(5,'Bureau'),(6,'OpenSpace');
78/*!40000 ALTER TABLE `Rooms` ENABLE KEYS */;
79UNLOCK TABLES;
80
81--
82-- Table structure for table `infos`
83--
84
85DROP TABLE IF EXISTS `infos`;
86/*!40101 SET @saved_cs_client = @@character_set_client */;
87/*!40101 SET character_set_client = utf8 */;
88CREATE TABLE `infos` (
89 `Nom` varchar(20) DEFAULT NULL,
90 `Prenom` varchar(20) DEFAULT NULL,
91 `Age` int(11) DEFAULT NULL,
92 `Lieu_de_residence` varchar(50) DEFAULT NULL,
93 `ID` int(11) NOT NULL AUTO_INCREMENT,
94 PRIMARY KEY (`ID`)
95) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
96/*!40101 SET character_set_client = @saved_cs_client */;
97
98--
99-- Dumping data for table `infos`
100--
101
102LOCK TABLES `infos` WRITE;
103/*!40000 ALTER TABLE `infos` DISABLE KEYS */;
104INSERT INTO `infos` VALUES ('Sparrow','Jack',30,'Tortuga',1),('Debranbadere','Kevin',30,'Lomme',2),('Kefif','Nezzar',27,'Lille',3),('Trentesaux','Olivier',3000,'Lille',4),('Delaine','Maxence',28,'Armentiere',5),('Lorie','Lorie',30,'Va voir sur Google',6),('Paul','Pierre',50,'Paris',7),('Daniels','Jack',29,'Lyon',8),('Jean','Peuplu',8,'Laloupe',9),('Monsieur','Google',78,'Pluton',10);
105/*!40000 ALTER TABLE `infos` ENABLE KEYS */;
106UNLOCK TABLES;
107/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
108
109/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
110/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
111/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
112/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
113/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
114/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
115/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
116
117-- Dump completed on 2018-04-10 17:16:31