· 7 years ago · Nov 30, 2018, 12:24 PM
1-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64)
2--
3-- Host: localhost Database: caroline_t_wcs_bordeaux
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: `caroline_t_wcs_bordeaux`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `caroline_t_wcs_bordeaux` /*!40100 DEFAULT CHARACTER SET latin1 */;
23
24USE `caroline_t_wcs_bordeaux`;
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=3 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,'Bordeaux'),(2,'Paris');
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(50) DEFAULT NULL,
60 `prenom` varchar(50) DEFAULT NULL,
61 `date_naissance` date DEFAULT NULL,
62 `lieu_de_residence` varchar(50) DEFAULT NULL,
63 `id_langage` int(11) DEFAULT NULL,
64 `id_ecole` int(11) DEFAULT NULL,
65 PRIMARY KEY (`id`),
66 KEY `id_langage` (`id_langage`),
67 KEY `id_ecole` (`id_ecole`),
68 CONSTRAINT `id_ecole` FOREIGN KEY (`id_ecole`) REFERENCES `ecoles` (`id`),
69 CONSTRAINT `id_langage` FOREIGN KEY (`id_langage`) REFERENCES `langages` (`id`)
70) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
71/*!40101 SET character_set_client = @saved_cs_client */;
72
73--
74-- Dumping data for table `eleves`
75--
76
77LOCK TABLES `eleves` WRITE;
78/*!40000 ALTER TABLE `eleves` DISABLE KEYS */;
79INSERT INTO `eleves` VALUES (1,'rintintin','junior','1990-01-01','Paris',1,1),(2,'google','tom','1999-01-02','Bordeaux',1,2),(3,'rie','lau','2000-04-13','Paris',2,1),(4,'theblues','agathe','1980-12-01','Tours',3,1),(5,'sairien','jean','1988-01-01','Perpette les oies',3,1);
80/*!40000 ALTER TABLE `eleves` ENABLE KEYS */;
81UNLOCK TABLES;
82
83--
84-- Table structure for table `langages`
85--
86
87DROP TABLE IF EXISTS `langages`;
88/*!40101 SET @saved_cs_client = @@character_set_client */;
89/*!40101 SET character_set_client = utf8 */;
90CREATE TABLE `langages` (
91 `id` int(11) NOT NULL AUTO_INCREMENT,
92 `nom` varchar(50) DEFAULT NULL,
93 PRIMARY KEY (`id`)
94) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
95/*!40101 SET character_set_client = @saved_cs_client */;
96
97--
98-- Dumping data for table `langages`
99--
100
101LOCK TABLES `langages` WRITE;
102/*!40000 ALTER TABLE `langages` DISABLE KEYS */;
103INSERT INTO `langages` VALUES (1,'PHP'),(2,'Javascript'),(3,'Java');
104/*!40000 ALTER TABLE `langages` ENABLE KEYS */;
105UNLOCK TABLES;
106/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
107
108/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
109/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
110/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
111/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
112/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
113/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
114/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
115
116-- Dump completed on 2018-11-30 10:06:27