· 7 years ago · Sep 25, 2018, 12:40 PM
1-- MySQL dump 10.13 Distrib 5.7.23, for Linux (x86_64)
2--
3-- Host: localhost Database: felix_t_wcs_lyon
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: `felix_t_wcs_lyon`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `felix_t_wcs_lyon` /*!40100 DEFAULT CHARACTER SET latin1 */;
23
24USE `felix_t_wcs_lyon`;
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_ecole` int(11) NOT NULL,
35 `ville` varchar(100) DEFAULT NULL,
36 PRIMARY KEY (`id_ecole`)
37) ENGINE=InnoDB 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,'Lyon'),(2,'Marseille'),(3,'La cote saint andre');
47/*!40000 ALTER TABLE `ecoles` ENABLE KEYS */;
48UNLOCK TABLES;
49
50--
51-- Table structure for table `langages`
52--
53
54DROP TABLE IF EXISTS `langages`;
55/*!40101 SET @saved_cs_client = @@character_set_client */;
56/*!40101 SET character_set_client = utf8 */;
57CREATE TABLE `langages` (
58 `id_langage` int(11) NOT NULL,
59 `nom` varchar(100) DEFAULT NULL,
60 PRIMARY KEY (`id_langage`)
61) ENGINE=InnoDB DEFAULT CHARSET=latin1;
62/*!40101 SET character_set_client = @saved_cs_client */;
63
64--
65-- Dumping data for table `langages`
66--
67
68LOCK TABLES `langages` WRITE;
69/*!40000 ALTER TABLE `langages` DISABLE KEYS */;
70INSERT INTO `langages` VALUES (1,'php'),(2,'JavaScript'),(3,'Java');
71/*!40000 ALTER TABLE `langages` ENABLE KEYS */;
72UNLOCK TABLES;
73
74--
75-- Table structure for table `students`
76--
77
78DROP TABLE IF EXISTS `students`;
79/*!40101 SET @saved_cs_client = @@character_set_client */;
80/*!40101 SET character_set_client = utf8 */;
81CREATE TABLE `students` (
82 `id` int(11) NOT NULL AUTO_INCREMENT,
83 `prenom` varchar(100) DEFAULT NULL,
84 `nom` varchar(150) DEFAULT NULL,
85 `adresse` text,
86 `id_langage` int(11) DEFAULT NULL,
87 `id_ecole` int(11) DEFAULT NULL,
88 PRIMARY KEY (`id`),
89 KEY `id_langage` (`id_langage`),
90 KEY `id_ecole` (`id_ecole`),
91 CONSTRAINT `students_ibfk_1` FOREIGN KEY (`id_langage`) REFERENCES `langages` (`id_langage`),
92 CONSTRAINT `students_ibfk_2` FOREIGN KEY (`id_ecole`) REFERENCES `ecoles` (`id_ecole`)
93) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
94/*!40101 SET character_set_client = @saved_cs_client */;
95
96--
97-- Dumping data for table `students`
98--
99
100LOCK TABLES `students` WRITE;
101/*!40000 ALTER TABLE `students` DISABLE KEYS */;
102INSERT INTO `students` VALUES (1,'Lorie','meilleure amie','5 rue de la positive attitude',1,3),(2,'Felix','TUFF','chez ouam',1,1),(3,'google','net','silicon valley',2,3),(4,'Lauriane','Nordiser','10 rue du bar',2,3),(5,'faycal','Drop table','tomboutou',3,2);
103/*!40000 ALTER TABLE `students` 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-25 13:41:32