· 7 years ago · Nov 20, 2018, 06:04 PM
1-- MySQL dump 10.13 Distrib 5.7.24, for Linux (x86_64)
2--
3-- Host: localhost Database: loubna_b_wcs_tours
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: `loubna_b_wcs_tours`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `loubna_b_wcs_tours` /*!40100 DEFAULT CHARACTER SET latin1 */;
23
24USE `loubna_b_wcs_tours`;
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 AUTO_INCREMENT,
35 `ville` varchar(255) DEFAULT NULL,
36 PRIMARY KEY (`id_ecole`)
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,'Tours'),(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_eleve` int(11) NOT NULL AUTO_INCREMENT,
59 `nom` varchar(30) DEFAULT NULL,
60 `prenom` varchar(30) DEFAULT NULL,
61 `age` int(2) DEFAULT NULL,
62 `lieu_residence` varchar(30) DEFAULT NULL,
63 `id_language` int(11) DEFAULT NULL,
64 `id_ecole` int(11) DEFAULT NULL,
65 PRIMARY KEY (`id_eleve`),
66 KEY `id_language` (`id_language`),
67 KEY `id_ecole` (`id_ecole`),
68 CONSTRAINT `eleves_ibfk_1` FOREIGN KEY (`id_language`) REFERENCES `languages` (`id_language`),
69 CONSTRAINT `eleves_ibfk_2` FOREIGN KEY (`id_ecole`) REFERENCES `ecoles` (`id_ecole`)
70) ENGINE=InnoDB AUTO_INCREMENT=12 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 (7,'bouam','loubna',30,'Tours',1,1),(8,'loda','mustapha',39,'Tours',1,1),(9,'cordier','benoit',29,'Tours',3,2),(10,'google','super',100,'paris',3,2),(11,'lorie','la belle',29,'paris',2,1);
80/*!40000 ALTER TABLE `eleves` ENABLE KEYS */;
81UNLOCK TABLES;
82
83--
84-- Table structure for table `enseigner`
85--
86
87DROP TABLE IF EXISTS `enseigner`;
88/*!40101 SET @saved_cs_client = @@character_set_client */;
89/*!40101 SET character_set_client = utf8 */;
90CREATE TABLE `enseigner` (
91 `id_language` int(11) NOT NULL,
92 `id_ecole` int(11) NOT NULL,
93 PRIMARY KEY (`id_language`,`id_ecole`),
94 KEY `id_ecole` (`id_ecole`),
95 CONSTRAINT `enseigner_ibfk_1` FOREIGN KEY (`id_language`) REFERENCES `languages` (`id_language`),
96 CONSTRAINT `enseigner_ibfk_2` FOREIGN KEY (`id_ecole`) REFERENCES `ecoles` (`id_ecole`)
97) ENGINE=InnoDB DEFAULT CHARSET=latin1;
98/*!40101 SET character_set_client = @saved_cs_client */;
99
100--
101-- Dumping data for table `enseigner`
102--
103
104LOCK TABLES `enseigner` WRITE;
105/*!40000 ALTER TABLE `enseigner` DISABLE KEYS */;
106/*!40000 ALTER TABLE `enseigner` ENABLE KEYS */;
107UNLOCK TABLES;
108
109--
110-- Table structure for table `languages`
111--
112
113DROP TABLE IF EXISTS `languages`;
114/*!40101 SET @saved_cs_client = @@character_set_client */;
115/*!40101 SET character_set_client = utf8 */;
116CREATE TABLE `languages` (
117 `id_language` int(11) NOT NULL AUTO_INCREMENT,
118 `libelle_language` varchar(255) DEFAULT NULL,
119 PRIMARY KEY (`id_language`)
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 `languages`
125--
126
127LOCK TABLES `languages` WRITE;
128/*!40000 ALTER TABLE `languages` DISABLE KEYS */;
129INSERT INTO `languages` VALUES (1,'PHP'),(2,'Javascript'),(3,'Java');
130/*!40000 ALTER TABLE `languages` 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-20 17:15:35