· 7 years ago · Nov 26, 2018, 03:30 PM
1-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64)
2--
3-- Host: localhost Database: benoit_c_wcs_tours_q2
4-- ------------------------------------------------------
5-- Server version 5.7.24-0ubuntu0.18.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: `benoit_c_wcs_tours_q2`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `benoit_c_wcs_tours_q2` /*!40100 DEFAULT CHARACTER SET latin1 */;
23
24USE `benoit_c_wcs_tours_q2`;
25
26--
27-- Table structure for table `ecole`
28--
29
30DROP TABLE IF EXISTS `ecole`;
31/*!40101 SET @saved_cs_client = @@character_set_client */;
32/*!40101 SET character_set_client = utf8 */;
33CREATE TABLE `ecole` (
34 `id_ecole` int(11) NOT NULL AUTO_INCREMENT,
35 `ville` varchar(50) DEFAULT NULL,
36 PRIMARY KEY (`id_ecole`)
37) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=latin1;
38/*!40101 SET character_set_client = @saved_cs_client */;
39
40--
41-- Dumping data for table `ecole`
42--
43
44LOCK TABLES `ecole` WRITE;
45/*!40000 ALTER TABLE `ecole` DISABLE KEYS */;
46INSERT INTO `ecole` VALUES (1,'Tours'),(2,'Paris'),(3,'London'),(4,'New York');
47/*!40000 ALTER TABLE `ecole` ENABLE KEYS */;
48UNLOCK TABLES;
49
50--
51-- Table structure for table `eleve`
52--
53
54DROP TABLE IF EXISTS `eleve`;
55/*!40101 SET @saved_cs_client = @@character_set_client */;
56/*!40101 SET character_set_client = utf8 */;
57CREATE TABLE `eleve` (
58 `id_eleve` int(11) NOT NULL AUTO_INCREMENT,
59 `id_ecole` int(11) DEFAULT NULL,
60 `id_langage` int(11) DEFAULT NULL,
61 `prenom` varchar(30) DEFAULT NULL,
62 `nom` varchar(30) DEFAULT NULL,
63 `addresse` varchar(100) DEFAULT NULL,
64 PRIMARY KEY (`id_eleve`),
65 KEY `id_ecole` (`id_ecole`),
66 KEY `id_langage` (`id_langage`),
67 CONSTRAINT `eleve_ibfk_1` FOREIGN KEY (`id_ecole`) REFERENCES `ecole` (`id_ecole`),
68 CONSTRAINT `eleve_ibfk_2` FOREIGN KEY (`id_langage`) REFERENCES `langage` (`id_langage`)
69) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
70/*!40101 SET character_set_client = @saved_cs_client */;
71
72--
73-- Dumping data for table `eleve`
74--
75
76LOCK TABLES `eleve` WRITE;
77/*!40000 ALTER TABLE `eleve` DISABLE KEYS */;
78INSERT INTO `eleve` VALUES (1,1,2,'Google','Inc','Worldwide'),(2,2,2,'Laurie','Pester','France'),(3,2,2,'Valentin','Berreur','Tours'),(4,4,3,'Joe','King','USA'),(5,2,2,'Manuel','Dos Santos','Portugal');
79/*!40000 ALTER TABLE `eleve` ENABLE KEYS */;
80UNLOCK TABLES;
81
82--
83-- Table structure for table `enseigne`
84--
85
86DROP TABLE IF EXISTS `enseigne`;
87/*!40101 SET @saved_cs_client = @@character_set_client */;
88/*!40101 SET character_set_client = utf8 */;
89CREATE TABLE `enseigne` (
90 `id_ecole` int(11) NOT NULL,
91 `id_langage` int(11) NOT NULL,
92 PRIMARY KEY (`id_ecole`,`id_langage`),
93 KEY `id_langage` (`id_langage`),
94 CONSTRAINT `enseigne_ibfk_1` FOREIGN KEY (`id_ecole`) REFERENCES `ecole` (`id_ecole`),
95 CONSTRAINT `enseigne_ibfk_2` FOREIGN KEY (`id_langage`) REFERENCES `langage` (`id_langage`)
96) ENGINE=InnoDB DEFAULT CHARSET=latin1;
97/*!40101 SET character_set_client = @saved_cs_client */;
98
99--
100-- Dumping data for table `enseigne`
101--
102
103LOCK TABLES `enseigne` WRITE;
104/*!40000 ALTER TABLE `enseigne` DISABLE KEYS */;
105INSERT INTO `enseigne` VALUES (4,1),(1,2),(2,2),(3,2),(4,2),(2,3),(3,3),(4,3);
106/*!40000 ALTER TABLE `enseigne` ENABLE KEYS */;
107UNLOCK TABLES;
108
109--
110-- Table structure for table `langage`
111--
112
113DROP TABLE IF EXISTS `langage`;
114/*!40101 SET @saved_cs_client = @@character_set_client */;
115/*!40101 SET character_set_client = utf8 */;
116CREATE TABLE `langage` (
117 `id_langage` int(11) NOT NULL AUTO_INCREMENT,
118 `nom` varchar(50) DEFAULT NULL,
119 PRIMARY KEY (`id_langage`)
120) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
121/*!40101 SET character_set_client = @saved_cs_client */;
122
123--
124-- Dumping data for table `langage`
125--
126
127LOCK TABLES `langage` WRITE;
128/*!40000 ALTER TABLE `langage` DISABLE KEYS */;
129INSERT INTO `langage` VALUES (1,'PHP'),(2,'JavaScript'),(3,'Java');
130/*!40000 ALTER TABLE `langage` ENABLE KEYS */;
131UNLOCK TABLES;
132/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
133
134/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
135/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
136/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
137/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
138/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
139/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
140/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
141
142-- Dump completed on 2018-11-26 15:27:07