· 8 years ago · May 27, 2018, 01:24 AM
1-- MySQL dump 10.13 Distrib 5.7.22, for Linux (x86_64)
2--
3-- Host: localhost Database: queteSQL
4-- ------------------------------------------------------
5-- Server version 5.7.22-0ubuntu18.04.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: `queteSQL`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `queteSQL` /*!40100 DEFAULT CHARACTER SET latin1 */;
23
24USE `queteSQL`;
25
26--
27-- Table structure for table `personnes`
28--
29
30DROP TABLE IF EXISTS `personnes`;
31/*!40101 SET @saved_cs_client = @@character_set_client */;
32/*!40101 SET character_set_client = utf8 */;
33CREATE TABLE `personnes` (
34 `id` int(11) NOT NULL AUTO_INCREMENT,
35 `nom` varchar(100) NOT NULL,
36 `prenom` varchar(100) NOT NULL,
37 `langage` varchar(100) NOT NULL,
38 `formateur` tinyint(1) NOT NULL,
39 PRIMARY KEY (`id`)
40) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=latin1;
41/*!40101 SET character_set_client = @saved_cs_client */;
42
43--
44-- Dumping data for table `personnes`
45--
46
47LOCK TABLES `personnes` WRITE;
48/*!40000 ALTER TABLE `personnes` DISABLE KEYS */;
49INSERT INTO `personnes` VALUES (1,'','Laurie','Sans',0),(2,'Google','Inc','All',1),(6,'Foucault','Pierre','C++',0),(7,'Obama','Barack','Langue de bois',0),(8,'Bruce','Lee','Javascript',1),(9,'Albert','Einstein','all',1),(10,'John','Lenon','Python',0),(11,'Serge','Gainsbourg','Java',1),(12,'Bruce','Willis','Assembleur',1),(13,'Lady','Gaga','Perl',0);
50/*!40000 ALTER TABLE `personnes` ENABLE KEYS */;
51UNLOCK TABLES;
52
53--
54-- Table structure for table `reservations`
55--
56
57DROP TABLE IF EXISTS `reservations`;
58/*!40101 SET @saved_cs_client = @@character_set_client */;
59/*!40101 SET character_set_client = utf8 */;
60CREATE TABLE `reservations` (
61 `id_reservation` int(11) NOT NULL AUTO_INCREMENT,
62 `date_reservation` date NOT NULL,
63 `dureeJours` int(11) NOT NULL,
64 `dureeHeures` int(11) NOT NULL,
65 `dureeMinutes` int(11) NOT NULL,
66 `dureeSecondes` int(11) NOT NULL,
67 `id_salle` int(11) NOT NULL,
68 `id_personne` int(11) NOT NULL,
69 PRIMARY KEY (`id_reservation`),
70 KEY `Contraint_idPersonne` (`id_personne`),
71 KEY `Contraint_idSalle` (`id_salle`),
72 CONSTRAINT `Contraint_idPersonne` FOREIGN KEY (`id_personne`) REFERENCES `personnes` (`id`),
73 CONSTRAINT `Contraint_idSalle` FOREIGN KEY (`id_salle`) REFERENCES `salles` (`id`)
74) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1;
75/*!40101 SET character_set_client = @saved_cs_client */;
76
77--
78-- Dumping data for table `reservations`
79--
80
81LOCK TABLES `reservations` WRITE;
82/*!40000 ALTER TABLE `reservations` DISABLE KEYS */;
83INSERT INTO `reservations` VALUES (1,'2018-05-17',2,43,2,1,1,1),(2,'2018-05-10',4,4,3,1,1,2),(3,'2018-05-17',2,1,3,2,5,6),(4,'2018-05-24',6,4,3,6,5,7),(5,'2018-05-31',3,9,8,3,3,13),(6,'2018-05-17',8,7,0,2,1,8),(7,'2018-05-19',9,8,7,3,6,9),(8,'2018-05-19',3,5,3,2,6,10),(9,'2018-05-17',2,4,1,9,6,11),(10,'2018-05-24',9,3,7,0,6,12);
84/*!40000 ALTER TABLE `reservations` ENABLE KEYS */;
85UNLOCK TABLES;
86
87--
88-- Table structure for table `salles`
89--
90
91DROP TABLE IF EXISTS `salles`;
92/*!40101 SET @saved_cs_client = @@character_set_client */;
93/*!40101 SET character_set_client = utf8 */;
94CREATE TABLE `salles` (
95 `id` int(11) NOT NULL AUTO_INCREMENT,
96 `nom_salle` varchar(100) NOT NULL,
97 PRIMARY KEY (`id`)
98) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=latin1;
99/*!40101 SET character_set_client = @saved_cs_client */;
100
101--
102-- Dumping data for table `salles`
103--
104
105LOCK TABLES `salles` WRITE;
106/*!40000 ALTER TABLE `salles` DISABLE KEYS */;
107INSERT INTO `salles` VALUES (1,'Salle de dojo'),(2,'Salle de réunion'),(3,'Salle de repos'),(4,'Cuisine'),(5,'Bureau'),(6,'OpenSpace');
108/*!40000 ALTER TABLE `salles` ENABLE KEYS */;
109UNLOCK TABLES;
110/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
111
112/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
113/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
114/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
115/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
116/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
117/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
118/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
119
120-- Dump completed on 2018-05-22 12:13:18