· 8 years ago · Mar 27, 2018, 08:10 AM
1CREATE DATABASE IF NOT EXISTS `reservation_salle` /*!40100 DEFAULT CHARACTER SET latin1 */;
2USE `reservation_salle`;
3-- MySQL dump 10.13 Distrib 5.7.17, for Win64 (x86_64)
4--
5-- Host: localhost Database: reservation_salle
6-- ------------------------------------------------------
7-- Server version 5.7.19
8
9/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
10/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
11/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
12/*!40101 SET NAMES utf8 */;
13/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
14/*!40103 SET TIME_ZONE='+00:00' */;
15/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
16/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
17/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
18/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
19
20--
21-- Table structure for table `language_prog`
22--
23
24DROP TABLE IF EXISTS `language_prog`;
25/*!40101 SET @saved_cs_client = @@character_set_client */;
26/*!40101 SET character_set_client = utf8 */;
27CREATE TABLE `language_prog` (
28 `id` int(11) NOT NULL AUTO_INCREMENT,
29 `language_name` varchar(45) NOT NULL,
30 PRIMARY KEY (`id`)
31) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
32/*!40101 SET character_set_client = @saved_cs_client */;
33
34--
35-- Dumping data for table `language_prog`
36--
37
38LOCK TABLES `language_prog` WRITE;
39/*!40000 ALTER TABLE `language_prog` DISABLE KEYS */;
40INSERT INTO `language_prog` VALUES (1,'PHP'),(2,'Js'),(3,'Ruby');
41/*!40000 ALTER TABLE `language_prog` ENABLE KEYS */;
42UNLOCK TABLES;
43
44--
45-- Table structure for table `person`
46--
47
48DROP TABLE IF EXISTS `person`;
49/*!40101 SET @saved_cs_client = @@character_set_client */;
50/*!40101 SET character_set_client = utf8 */;
51CREATE TABLE `person` (
52 `id` int(11) NOT NULL AUTO_INCREMENT,
53 `firstname` varchar(45) NOT NULL,
54 `lastname` varchar(45) NOT NULL,
55 `address` varchar(255) NOT NULL,
56 `Language_prog_id` int(11) DEFAULT NULL,
57 `Role_id` int(11) DEFAULT NULL,
58 PRIMARY KEY (`id`),
59 KEY `Language_prog_id` (`Language_prog_id`),
60 KEY `Role_id` (`Role_id`)
61) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
62/*!40101 SET character_set_client = @saved_cs_client */;
63
64--
65-- Dumping data for table `person`
66--
67
68LOCK TABLES `person` WRITE;
69/*!40000 ALTER TABLE `person` DISABLE KEYS */;
70INSERT INTO `person` VALUES (1,'Lorie','Lorie','1 rue banane',1,1),(2,'Arnaud','Gauthier','2 rue raisin',1,1),(3,'Quentin','Picard','3 rue kiwi',1,1),(4,'Steven','Grillon','4 rue orange',2,1),(5,'Nico','Juin','(5 rue raisin',2,1),(6,'Mathieu','Carlevaris','6 rue pasteque',3,1),(7,'Brice','Jauguin','7 rue pamplemousse',3,1),(8,'Sylvain','Format1','8 rue labo',1,2),(9,'Nicolas','Format2','9 rue labo',1,2),(10,'Google','Google','10 rue recherche',1,1);
71/*!40000 ALTER TABLE `person` ENABLE KEYS */;
72UNLOCK TABLES;
73
74--
75-- Table structure for table `reservation`
76--
77
78DROP TABLE IF EXISTS `reservation`;
79/*!40101 SET @saved_cs_client = @@character_set_client */;
80/*!40101 SET character_set_client = utf8 */;
81CREATE TABLE `reservation` (
82 `id` int(11) NOT NULL AUTO_INCREMENT,
83 `Person_id` int(11) DEFAULT NULL,
84 `Room_id` int(11) DEFAULT NULL,
85 `begin_at` datetime NOT NULL,
86 `duration` int(11) NOT NULL,
87 PRIMARY KEY (`id`),
88 KEY `Person_id` (`Person_id`),
89 KEY `Room_id` (`Room_id`)
90) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
91/*!40101 SET character_set_client = @saved_cs_client */;
92
93--
94-- Dumping data for table `reservation`
95--
96
97LOCK TABLES `reservation` WRITE;
98/*!40000 ALTER TABLE `reservation` DISABLE KEYS */;
99INSERT INTO `reservation` VALUES (1,1,1,'2005-04-08 02:00:00',1),(2,2,1,'2018-03-20 13:00:00',2),(3,3,1,'2018-03-21 14:00:00',3),(4,4,5,'2018-03-19 15:00:00',1),(5,5,5,'2018-03-20 16:00:00',2),(6,6,3,'2018-03-21 17:00:00',3),(7,7,6,'2018-03-22 18:00:00',1),(8,8,6,'2018-03-23 19:00:00',2),(9,9,6,'2018-03-24 20:00:00',3),(10,10,6,'2018-03-25 21:00:00',4);
100/*!40000 ALTER TABLE `reservation` ENABLE KEYS */;
101UNLOCK TABLES;
102
103--
104-- Table structure for table `role`
105--
106
107DROP TABLE IF EXISTS `role`;
108/*!40101 SET @saved_cs_client = @@character_set_client */;
109/*!40101 SET character_set_client = utf8 */;
110CREATE TABLE `role` (
111 `id` int(11) NOT NULL AUTO_INCREMENT,
112 `role_name` varchar(45) NOT NULL,
113 PRIMARY KEY (`id`)
114) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
115/*!40101 SET character_set_client = @saved_cs_client */;
116
117--
118-- Dumping data for table `role`
119--
120
121LOCK TABLES `role` WRITE;
122/*!40000 ALTER TABLE `role` DISABLE KEYS */;
123INSERT INTO `role` VALUES (1,'Etudiant'),(2,'Formateur');
124/*!40000 ALTER TABLE `role` ENABLE KEYS */;
125UNLOCK TABLES;
126
127--
128-- Table structure for table `room`
129--
130
131DROP TABLE IF EXISTS `room`;
132/*!40101 SET @saved_cs_client = @@character_set_client */;
133/*!40101 SET character_set_client = utf8 */;
134CREATE TABLE `room` (
135 `id` int(11) NOT NULL AUTO_INCREMENT,
136 `room_name` varchar(45) NOT NULL,
137 PRIMARY KEY (`id`)
138) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
139/*!40101 SET character_set_client = @saved_cs_client */;
140
141--
142-- Dumping data for table `room`
143--
144
145LOCK TABLES `room` WRITE;
146/*!40000 ALTER TABLE `room` DISABLE KEYS */;
147INSERT INTO `room` VALUES (1,'Salle de dojo'),(2,'Salle de réunion'),(3,'Salle de repos'),(4,'Cuisine'),(5,'Bureau'),(6,'OpenSpace');
148/*!40000 ALTER TABLE `room` ENABLE KEYS */;
149UNLOCK TABLES;
150
151--
152-- Dumping events for database 'reservation_salle'
153--
154
155--
156-- Dumping routines for database 'reservation_salle'
157--
158/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
159
160/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
161/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
162/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
163/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
164/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
165/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
166/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
167
168-- Dump completed on 2018-03-18 23:29:31