· 8 years ago · Mar 31, 2018, 10:20 AM
1-- MySQL dump 10.13 Distrib 5.7.21, for Linux (x86_64)
2--
3-- Host: localhost Database: students
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-- Table structure for table `reservation`
20--
21
22DROP TABLE IF EXISTS `reservation`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `reservation` (
26 `id` int(11) NOT NULL AUTO_INCREMENT,
27 `Reservation_date` datetime DEFAULT NULL,
28 `duration` time DEFAULT NULL,
29 `rooms_ID` int(11) DEFAULT NULL,
30 `students_id` int(11) DEFAULT NULL,
31 PRIMARY KEY (`id`),
32 KEY `rooms_ID` (`rooms_ID`),
33 KEY `students_id` (`students_id`),
34 CONSTRAINT `reservation_ibfk_1` FOREIGN KEY (`rooms_ID`) REFERENCES `rooms` (`id`),
35 CONSTRAINT `reservation_ibfk_2` FOREIGN KEY (`students_id`) REFERENCES `students` (`id`)
36) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
37/*!40101 SET character_set_client = @saved_cs_client */;
38
39--
40-- Dumping data for table `reservation`
41--
42
43LOCK TABLES `reservation` WRITE;
44/*!40000 ALTER TABLE `reservation` DISABLE KEYS */;
45INSERT INTO `reservation` VALUES (1,'2018-03-22 09:00:00','00:30:00',3,1),(2,'2018-03-22 09:00:00','00:30:00',1,2),(3,'2018-03-22 09:30:00','00:30:00',1,3),(4,'2018-03-22 10:30:00','00:30:00',1,4),(5,'2018-03-22 10:30:00','00:30:00',5,5),(6,'2018-03-22 10:00:00','00:30:00',5,6),(7,'2018-03-22 10:00:00','00:30:00',6,7),(8,'2018-03-22 10:30:00','00:30:00',6,8),(9,'2018-03-22 11:00:00','00:30:00',6,9),(10,'2018-03-22 11:30:00','00:30:00',6,10);
46/*!40000 ALTER TABLE `reservation` ENABLE KEYS */;
47UNLOCK TABLES;
48
49--
50-- Table structure for table `rooms`
51--
52
53DROP TABLE IF EXISTS `rooms`;
54/*!40101 SET @saved_cs_client = @@character_set_client */;
55/*!40101 SET character_set_client = utf8 */;
56CREATE TABLE `rooms` (
57 `id` int(11) NOT NULL AUTO_INCREMENT,
58 `name` varchar(30) DEFAULT NULL,
59 PRIMARY KEY (`id`)
60) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
61/*!40101 SET character_set_client = @saved_cs_client */;
62
63--
64-- Dumping data for table `rooms`
65--
66
67LOCK TABLES `rooms` WRITE;
68/*!40000 ALTER TABLE `rooms` DISABLE KEYS */;
69INSERT INTO `rooms` VALUES (1,'Salle de Dojo'),(2,'Salle de réunion'),(3,'Salle de repos'),(4,'Cuisine'),(5,'Bureau'),(6,'Open Space');
70/*!40000 ALTER TABLE `rooms` ENABLE KEYS */;
71UNLOCK TABLES;
72
73--
74-- Table structure for table `students`
75--
76
77DROP TABLE IF EXISTS `students`;
78/*!40101 SET @saved_cs_client = @@character_set_client */;
79/*!40101 SET character_set_client = utf8 */;
80CREATE TABLE `students` (
81 `id` int(11) NOT NULL AUTO_INCREMENT,
82 `last_name` varchar(24) DEFAULT NULL,
83 `firstname` varchar(24) DEFAULT NULL,
84 `age` int(11) DEFAULT NULL,
85 `location` varchar(24) DEFAULT NULL,
86 PRIMARY KEY (`id`)
87) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
88/*!40101 SET character_set_client = @saved_cs_client */;
89
90--
91-- Dumping data for table `students`
92--
93
94LOCK TABLES `students` WRITE;
95/*!40000 ALTER TABLE `students` DISABLE KEYS */;
96INSERT INTO `students` VALUES (1,'Shannon','Michael',43,'Hollywood'),(2,'Chastaing','Jessica',40,'Hollywood'),(3,'Eastwood','Clint',80,'Hollywood'),(4,'Willis','Bruce',57,'Hollywood'),(5,'Cruise','Tom',55,'Hollywood'),(6,'Selleck','Tom',60,'Hollywood'),(7,'Roberts','Julia',50,'Hollywood'),(8,'Google','Goggle',43,'Hollywood'),(9,'','Lorie',35,'Paris'),(10,'Clinton','Bill',65,'Washington');
97/*!40000 ALTER TABLE `students` ENABLE KEYS */;
98UNLOCK TABLES;
99/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
100
101/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
102/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
103/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
104/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
105/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
106/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
107/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
108
109-- Dump completed on 2018-03-22 16:54:48