· 8 years ago · Mar 27, 2018, 06:06 AM
1-- MySQL dump 10.13 Distrib 5.6.38, for osx10.9 (x86_64)
2--
3-- Host: localhost Database: quetesql
4-- ------------------------------------------------------
5-- Server version 5.6.38
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: `quetesql`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `quetesql` /*!40100 DEFAULT CHARACTER SET utf8 */;
23
24USE `quetesql`;
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 `id` int(11) NOT NULL AUTO_INCREMENT,
35 `date` datetime NOT NULL,
36 `RoomID` int(2) DEFAULT NULL,
37 `UserID` int(2) DEFAULT NULL,
38 `Duration_Hours` int(2) DEFAULT NULL,
39 PRIMARY KEY (`id`),
40 KEY `RoomID` (`RoomID`),
41 KEY `UserID` (`UserID`),
42 CONSTRAINT `reservation_ibfk_1` FOREIGN KEY (`RoomID`) REFERENCES `room` (`id`),
43 CONSTRAINT `reservation_ibfk_2` FOREIGN KEY (`UserID`) REFERENCES `user` (`id`)
44) ENGINE=InnoDB AUTO_INCREMENT=12 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-03-25 14:00:00',1,1,6),(2,'2018-03-28 18:00:00',6,10,2),(3,'2018-03-24 09:00:00',1,2,4),(4,'2018-03-23 09:00:00',1,3,4),(5,'2018-03-27 09:00:00',5,4,4),(6,'2018-03-27 14:00:00',5,5,4),(7,'2018-03-28 14:00:00',3,6,4),(8,'2018-03-28 09:00:00',6,7,4),(9,'2018-03-28 14:00:00',6,8,2),(10,'2018-03-28 16:00:00',6,9,2);
54/*!40000 ALTER TABLE `reservation` ENABLE KEYS */;
55UNLOCK TABLES;
56
57--
58-- Table structure for table `room`
59--
60
61DROP TABLE IF EXISTS `room`;
62/*!40101 SET @saved_cs_client = @@character_set_client */;
63/*!40101 SET character_set_client = utf8 */;
64CREATE TABLE `room` (
65 `id` int(11) NOT NULL AUTO_INCREMENT,
66 `name` varchar(100) DEFAULT NULL,
67 `UserID` int(11) DEFAULT NULL,
68 PRIMARY KEY (`id`),
69 KEY `UserID` (`UserID`),
70 CONSTRAINT `room_ibfk_1` FOREIGN KEY (`UserID`) REFERENCES `user` (`id`)
71) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
72/*!40101 SET character_set_client = @saved_cs_client */;
73
74--
75-- Dumping data for table `room`
76--
77
78LOCK TABLES `room` WRITE;
79/*!40000 ALTER TABLE `room` DISABLE KEYS */;
80INSERT INTO `room` VALUES (1,'Salle_de_dojo',NULL),(2,'Salle_de_réunion',NULL),(3,'Salle_de_repos',NULL),(4,'Cuisine',NULL),(5,'Bureau',NULL),(6,'OpenSpace',NULL);
81/*!40000 ALTER TABLE `room` ENABLE KEYS */;
82UNLOCK TABLES;
83
84--
85-- Table structure for table `user`
86--
87
88DROP TABLE IF EXISTS `user`;
89/*!40101 SET @saved_cs_client = @@character_set_client */;
90/*!40101 SET character_set_client = utf8 */;
91CREATE TABLE `user` (
92 `id` int(11) NOT NULL AUTO_INCREMENT,
93 `name` varchar(100) DEFAULT NULL,
94 `firstname` varchar(100) DEFAULT NULL,
95 `status` varchar(50) DEFAULT NULL,
96 `Language` varchar(255) DEFAULT NULL,
97 `adress` varchar(255) DEFAULT NULL,
98 PRIMARY KEY (`id`)
99) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;
100/*!40101 SET character_set_client = @saved_cs_client */;
101
102--
103-- Dumping data for table `user`
104--
105
106LOCK TABLES `user` WRITE;
107/*!40000 ALTER TABLE `user` DISABLE KEYS */;
108INSERT INTO `user` VALUES (1,'Martin','Aurelien','Student','PHP','Roubaix'),(2,'Kefif','Nezzar','Student','JS','Lille'),(3,'Google','AlPage','Professor','PHP','Lille'),(4,'Delaine','Nmaxence','Student','JS','Henin'),(5,'Urbaniak','Alexandre','Student','PHP','Croix'),(6,'Jugnot','Gerard','Student','PHP','Lambersart'),(7,'Lory','Connasse','Student','JS','Paris'),(8,'John','John','Student','JS','Lille'),(9,'Jean','Jean','Student','PHP','Roubaix'),(10,'Tom','Tom','Professor','PHP','Roubaix');
109/*!40000 ALTER TABLE `user` ENABLE KEYS */;
110UNLOCK TABLES;
111/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
112
113/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
114/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
115/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
116/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
117/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
118/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
119/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
120
121-- Dump completed on 2018-03-18 21:02:40