· 7 years ago · Sep 19, 2018, 07:48 PM
1-- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64)
2--
3-- Host: localhost Database: nicolas_c_wcs_strasbourg
4-- ------------------------------------------------------
5-- Server version 5.7.23-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: `nicolas_c_wcs_strasbourg`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `nicolas_c_wcs_strasbourg` /*!40100 DEFAULT CHARACTER SET latin1 */;
23
24USE `nicolas_c_wcs_strasbourg`;
25
26--
27-- Table structure for table `ecoles`
28--
29
30DROP TABLE IF EXISTS `ecoles`;
31/*!40101 SET @saved_cs_client = @@character_set_client */;
32/*!40101 SET character_set_client = utf8 */;
33CREATE TABLE `ecoles` (
34 `id` int(11) NOT NULL AUTO_INCREMENT,
35 `ville` varchar(50) DEFAULT NULL,
36 PRIMARY KEY (`id`)
37) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
38/*!40101 SET character_set_client = @saved_cs_client */;
39
40--
41-- Dumping data for table `ecoles`
42--
43
44LOCK TABLES `ecoles` WRITE;
45/*!40000 ALTER TABLE `ecoles` DISABLE KEYS */;
46INSERT INTO `ecoles` VALUES (1,'Paris'),(2,'Strasbourg'),(3,'Montreal');
47/*!40000 ALTER TABLE `ecoles` ENABLE KEYS */;
48UNLOCK TABLES;
49
50--
51-- Table structure for table `eleves`
52--
53
54DROP TABLE IF EXISTS `eleves`;
55/*!40101 SET @saved_cs_client = @@character_set_client */;
56/*!40101 SET character_set_client = utf8 */;
57CREATE TABLE `eleves` (
58 `id` int(11) NOT NULL AUTO_INCREMENT,
59 `nom` varchar(100) DEFAULT NULL,
60 `prénom` varchar(100) DEFAULT NULL,
61 `adresse` varchar(100) DEFAULT NULL,
62 `ecole_id` int(11) DEFAULT NULL,
63 `langage_id` int(11) DEFAULT NULL,
64 PRIMARY KEY (`id`),
65 KEY `ecole_id` (`ecole_id`),
66 KEY `langage_id` (`langage_id`),
67 CONSTRAINT `eleves_ibfk_1` FOREIGN KEY (`ecole_id`) REFERENCES `ecoles` (`id`),
68 CONSTRAINT `eleves_ibfk_2` FOREIGN KEY (`langage_id`) REFERENCES `langages` (`id`)
69) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
70/*!40101 SET character_set_client = @saved_cs_client */;
71
72--
73-- Dumping data for table `eleves`
74--
75
76LOCK TABLES `eleves` WRITE;
77/*!40000 ALTER TABLE `eleves` DISABLE KEYS */;
78INSERT INTO `eleves` VALUES (1,'Sparrow','Jack','Tortuga',1,1),(2,'Hollande','Francois','Paris',1,1),(3,'Mbappe','Kylian','Saint-Germain',1,2),(4,'Kutuk','Yavuz','Strasbourg',2,3),(5,'Lo','Rie','Père Lachaise',3,3),(6,'Google','Search Bar','Mountain View',3,3);
79/*!40000 ALTER TABLE `eleves` ENABLE KEYS */;
80UNLOCK TABLES;
81
82--
83-- Table structure for table `langages`
84--
85
86DROP TABLE IF EXISTS `langages`;
87/*!40101 SET @saved_cs_client = @@character_set_client */;
88/*!40101 SET character_set_client = utf8 */;
89CREATE TABLE `langages` (
90 `id` int(11) NOT NULL AUTO_INCREMENT,
91 `nom` varchar(50) DEFAULT NULL,
92 PRIMARY KEY (`id`)
93) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
94/*!40101 SET character_set_client = @saved_cs_client */;
95
96--
97-- Dumping data for table `langages`
98--
99
100LOCK TABLES `langages` WRITE;
101/*!40000 ALTER TABLE `langages` DISABLE KEYS */;
102INSERT INTO `langages` VALUES (1,'PHP'),(2,'JavaScript'),(3,'Java');
103/*!40000 ALTER TABLE `langages` ENABLE KEYS */;
104UNLOCK TABLES;
105/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
106
107/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
108/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
109/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
110/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
111/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
112/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
113/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
114
115-- Dump completed on 2018-09-19 19:39:48