· 7 years ago · Nov 30, 2018, 12:34 PM
1-- MySQL dump 10.13 Distrib 8.0.13, for macos10.14 (x86_64)
2--
3-- Host: localhost Database: agnes_r_wcs_bordeaux
4-- ------------------------------------------------------
5-- Server version 8.0.13
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 SET NAMES utf8mb4 ;
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: `agnes_r_wcs_bordeaux`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `agnes_r_wcs_bordeaux` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */;
23
24USE `agnes_r_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 SET character_set_client = utf8mb4 ;
33CREATE TABLE `ecoles` (
34 `id` int(11) NOT NULL AUTO_INCREMENT,
35 `ville` varchar(100) NOT NULL,
36 PRIMARY KEY (`id`)
37) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
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 SET character_set_client = utf8mb4 ;
57CREATE TABLE `eleves` (
58 `id` int(11) NOT NULL AUTO_INCREMENT,
59 `Nom` varchar(100) NOT NULL,
60 `Prénom` varchar(100) NOT NULL,
61 `Adresse` varchar(300) NOT NULL,
62 `Age` int(11) NOT NULL,
63 `Lieu de résidence` varchar(100) NOT NULL,
64 `id_langage` int(11) NOT NULL,
65 `id_ecole` int(11) NOT NULL,
66 PRIMARY KEY (`id`),
67 KEY `id_ecole` (`id_ecole`),
68 KEY `id_langage` (`id_langage`),
69 CONSTRAINT `eleves_ibfk_1` FOREIGN KEY (`id_ecole`) REFERENCES `ecoles` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT,
70 CONSTRAINT `eleves_ibfk_2` FOREIGN KEY (`id_langage`) REFERENCES `langages` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
71) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;
72/*!40101 SET character_set_client = @saved_cs_client */;
73
74--
75-- Dumping data for table `eleves`
76--
77
78LOCK TABLES `eleves` WRITE;
79/*!40000 ALTER TABLE `eleves` DISABLE KEYS */;
80INSERT INTO `eleves` VALUES (1,'Ribeiro','Agnès','11 rue de la liberté',40,'Talence',2,1),(2,'Fettinger','Julien','28 avenue du grand Duc',30,'Paris',2,1),(3,'Safadi','Maya','45 rue de l\'océan',28,'Bordeaux',3,2),(4,'Pouget','Vivien','21 avenue de l\'océan',31,'Bayonne',1,1),(5,'Monamie','Lorie','13 rue de la camaraderie',25,'Bisounourland',2,1),(6,'Monchat','Léo','22 rue de la croquette',21,'Paris',3,1),(7,'Monpetitchat','Bliss','22 rue du miaulement',18,'Toulouse',3,2),(8,'Mu','Mina','21 rue de la paix',38,'Athis-Mons',2,1),(9,'Laba','Jérémie','45 rue du zen',35,'Nice',1,2),(10,'Go','google','22 place du net',30,'Brest',2,1);
81/*!40000 ALTER TABLE `eleves` ENABLE KEYS */;
82UNLOCK TABLES;
83
84--
85-- Table structure for table `langages`
86--
87
88DROP TABLE IF EXISTS `langages`;
89/*!40101 SET @saved_cs_client = @@character_set_client */;
90 SET character_set_client = utf8mb4 ;
91CREATE TABLE `langages` (
92 `id` int(11) NOT NULL AUTO_INCREMENT,
93 `Nom` varchar(50) NOT NULL,
94 PRIMARY KEY (`id`)
95) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci ROW_FORMAT=COMPACT;
96/*!40101 SET character_set_client = @saved_cs_client */;
97
98--
99-- Dumping data for table `langages`
100--
101
102LOCK TABLES `langages` WRITE;
103/*!40000 ALTER TABLE `langages` DISABLE KEYS */;
104INSERT INTO `langages` VALUES (1,'PHP'),(2,'JavaScript'),(3,'Java');
105/*!40000 ALTER TABLE `langages` ENABLE KEYS */;
106UNLOCK TABLES;
107/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
108
109/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
110/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
111/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
112/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
113/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
114/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
115/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
116
117-- Dump completed on 2018-11-30 10:18:04