· 7 years ago · Jan 08, 2019, 11:04 PM
1-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64)
2--
3-- Host: localhost Database: hanaa_o_wcs_bxl
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-- Table structure for table `ecole_langues_junction`
20--
21
22DROP TABLE IF EXISTS `ecole_langues_junction`;
23/*!40101 SET @saved_cs_client = @@character_set_client */;
24/*!40101 SET character_set_client = utf8 */;
25CREATE TABLE `ecole_langues_junction` (
26 `langueID` int(11) NOT NULL,
27 `ecoleID` int(11) NOT NULL,
28 PRIMARY KEY (`langueID`,`ecoleID`),
29 KEY `ecoleID` (`ecoleID`),
30 CONSTRAINT `ecole_langues_junction_ibfk_1` FOREIGN KEY (`langueID`) REFERENCES `langues` (`id`),
31 CONSTRAINT `ecole_langues_junction_ibfk_2` FOREIGN KEY (`ecoleID`) REFERENCES `ecoles` (`id`)
32) ENGINE=InnoDB DEFAULT CHARSET=latin1;
33/*!40101 SET character_set_client = @saved_cs_client */;
34
35--
36-- Dumping data for table `ecole_langues_junction`
37--
38
39LOCK TABLES `ecole_langues_junction` WRITE;
40/*!40000 ALTER TABLE `ecole_langues_junction` DISABLE KEYS */;
41INSERT INTO `ecole_langues_junction` VALUES (3,1),(1,2),(2,2);
42/*!40000 ALTER TABLE `ecole_langues_junction` ENABLE KEYS */;
43UNLOCK TABLES;
44
45--
46-- Table structure for table `ecoles`
47--
48
49DROP TABLE IF EXISTS `ecoles`;
50/*!40101 SET @saved_cs_client = @@character_set_client */;
51/*!40101 SET character_set_client = utf8 */;
52CREATE TABLE `ecoles` (
53 `id` int(11) NOT NULL AUTO_INCREMENT,
54 `name` varchar(50) NOT NULL,
55 `ville_id` int(11) DEFAULT NULL,
56 PRIMARY KEY (`id`),
57 KEY `ville_id` (`ville_id`),
58 CONSTRAINT `ecoles_ibfk_1` FOREIGN KEY (`ville_id`) REFERENCES `villes` (`id`)
59) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
60/*!40101 SET character_set_client = @saved_cs_client */;
61
62--
63-- Dumping data for table `ecoles`
64--
65
66LOCK TABLES `ecoles` WRITE;
67/*!40000 ALTER TABLE `ecoles` DISABLE KEYS */;
68INSERT INTO `ecoles` VALUES (1,'ecole du bonheur',2),(2,'ecole de la vie',1);
69/*!40000 ALTER TABLE `ecoles` ENABLE KEYS */;
70UNLOCK TABLES;
71
72--
73-- Table structure for table `langues`
74--
75
76DROP TABLE IF EXISTS `langues`;
77/*!40101 SET @saved_cs_client = @@character_set_client */;
78/*!40101 SET character_set_client = utf8 */;
79CREATE TABLE `langues` (
80 `id` int(11) NOT NULL AUTO_INCREMENT,
81 `name` varchar(50) NOT NULL,
82 PRIMARY KEY (`id`)
83) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
84/*!40101 SET character_set_client = @saved_cs_client */;
85
86--
87-- Dumping data for table `langues`
88--
89
90LOCK TABLES `langues` WRITE;
91/*!40000 ALTER TABLE `langues` DISABLE KEYS */;
92INSERT INTO `langues` VALUES (1,'php'),(2,'javascript'),(3,'java');
93/*!40000 ALTER TABLE `langues` ENABLE KEYS */;
94UNLOCK TABLES;
95
96--
97-- Table structure for table `langues_students_junction`
98--
99
100DROP TABLE IF EXISTS `langues_students_junction`;
101/*!40101 SET @saved_cs_client = @@character_set_client */;
102/*!40101 SET character_set_client = utf8 */;
103CREATE TABLE `langues_students_junction` (
104 `langueID` int(11) NOT NULL,
105 `studentID` int(11) NOT NULL,
106 PRIMARY KEY (`langueID`,`studentID`),
107 KEY `studentID` (`studentID`),
108 CONSTRAINT `langues_students_junction_ibfk_1` FOREIGN KEY (`langueID`) REFERENCES `langues` (`id`),
109 CONSTRAINT `langues_students_junction_ibfk_2` FOREIGN KEY (`studentID`) REFERENCES `students` (`id`)
110) ENGINE=InnoDB DEFAULT CHARSET=latin1;
111/*!40101 SET character_set_client = @saved_cs_client */;
112
113--
114-- Dumping data for table `langues_students_junction`
115--
116
117LOCK TABLES `langues_students_junction` WRITE;
118/*!40000 ALTER TABLE `langues_students_junction` DISABLE KEYS */;
119INSERT INTO `langues_students_junction` VALUES (1,1),(1,2),(2,3),(3,4),(3,5);
120/*!40000 ALTER TABLE `langues_students_junction` ENABLE KEYS */;
121UNLOCK TABLES;
122
123--
124-- Table structure for table `students`
125--
126
127DROP TABLE IF EXISTS `students`;
128/*!40101 SET @saved_cs_client = @@character_set_client */;
129/*!40101 SET character_set_client = utf8 */;
130CREATE TABLE `students` (
131 `id` int(11) NOT NULL AUTO_INCREMENT,
132 `first_name` varchar(50) DEFAULT NULL,
133 `name` varchar(50) DEFAULT NULL,
134 `Adresse` text,
135 `ville_id` varchar(50) DEFAULT NULL,
136 `ecoleID` int(11) DEFAULT NULL,
137 PRIMARY KEY (`id`),
138 KEY `refkey_ecoleID` (`ecoleID`),
139 CONSTRAINT `refkey_ecoleID` FOREIGN KEY (`ecoleID`) REFERENCES `ecoles` (`id`)
140) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;
141/*!40101 SET character_set_client = @saved_cs_client */;
142
143--
144-- Dumping data for table `students`
145--
146
147LOCK TABLES `students` WRITE;
148/*!40000 ALTER TABLE `students` DISABLE KEYS */;
149INSERT INTO `students` VALUES (1,'Hanaa','Oulad','saint-Gilles','2',1),(2,'Roben','hood','somewhere in the woods','2',1),(3,'little','mermaid','the ocean','2',1),(4,'santa','claus','far far in the north','1',2),(5,'cinderella','unknown','some royal palace','1',2),(6,'Lorie','','','France',NULL),(7,'Google','MY BEST FRIEND','1600 Amphitheatre Parkway Mountain View California','USA',NULL);
150/*!40000 ALTER TABLE `students` ENABLE KEYS */;
151UNLOCK TABLES;
152
153--
154-- Table structure for table `villes`
155--
156
157DROP TABLE IF EXISTS `villes`;
158/*!40101 SET @saved_cs_client = @@character_set_client */;
159/*!40101 SET character_set_client = utf8 */;
160CREATE TABLE `villes` (
161 `id` int(11) NOT NULL AUTO_INCREMENT,
162 `name` varchar(50) DEFAULT NULL,
163 PRIMARY KEY (`id`)
164) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
165/*!40101 SET character_set_client = @saved_cs_client */;
166
167--
168-- Dumping data for table `villes`
169--
170
171LOCK TABLES `villes` WRITE;
172/*!40000 ALTER TABLE `villes` DISABLE KEYS */;
173INSERT INTO `villes` VALUES (1,'bruxelles'),(2,'amsterdam');
174/*!40000 ALTER TABLE `villes` ENABLE KEYS */;
175UNLOCK TABLES;
176/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
177
178/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
179/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
180/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
181/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
182/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
183/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
184/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
185
186-- Dump completed on 2019-01-08 16:59:18