· 7 years ago · Nov 26, 2018, 03:04 PM
1-- MySQL dump 10.13 Distrib 8.0.13, for macos10.14 (x86_64)
2--
3-- Host: localhost Database: mathieu_t_wcs_reims
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: `mathieu_t_wcs_reims`
20--
21
22CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mathieu_t_wcs_reims` /*!40100 DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci */;
23
24USE `mathieu_t_wcs_reims`;
25
26--
27-- Table structure for table `language`
28--
29
30DROP TABLE IF EXISTS `language`;
31/*!40101 SET @saved_cs_client = @@character_set_client */;
32 SET character_set_client = utf8mb4 ;
33CREATE TABLE `language` (
34 `id_language` int(11) NOT NULL AUTO_INCREMENT,
35 `name` varchar(255) DEFAULT NULL,
36 PRIMARY KEY (`id_language`)
37) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
38/*!40101 SET character_set_client = @saved_cs_client */;
39
40--
41-- Dumping data for table `language`
42--
43
44LOCK TABLES `language` WRITE;
45/*!40000 ALTER TABLE `language` DISABLE KEYS */;
46INSERT INTO `language` VALUES (1,'php'),(2,'java'),(3,'javascript');
47/*!40000 ALTER TABLE `language` ENABLE KEYS */;
48UNLOCK TABLES;
49
50--
51-- Table structure for table `school`
52--
53
54DROP TABLE IF EXISTS `school`;
55/*!40101 SET @saved_cs_client = @@character_set_client */;
56 SET character_set_client = utf8mb4 ;
57CREATE TABLE `school` (
58 `id_school` int(11) NOT NULL AUTO_INCREMENT,
59 `name` varchar(255) DEFAULT NULL,
60 `city` varchar(255) DEFAULT NULL,
61 PRIMARY KEY (`id_school`)
62) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
63/*!40101 SET character_set_client = @saved_cs_client */;
64
65--
66-- Dumping data for table `school`
67--
68
69LOCK TABLES `school` WRITE;
70/*!40000 ALTER TABLE `school` DISABLE KEYS */;
71INSERT INTO `school` VALUES (1,'WCS_reims','Reims'),(2,'WCS_paris','Paris');
72/*!40000 ALTER TABLE `school` ENABLE KEYS */;
73UNLOCK TABLES;
74
75--
76-- Table structure for table `student`
77--
78
79DROP TABLE IF EXISTS `student`;
80/*!40101 SET @saved_cs_client = @@character_set_client */;
81 SET character_set_client = utf8mb4 ;
82CREATE TABLE `student` (
83 `id` int(11) NOT NULL AUTO_INCREMENT,
84 `nom` varchar(55) DEFAULT NULL,
85 `prenom` varchar(55) DEFAULT NULL,
86 `adresse` text,
87 `age` int(3) DEFAULT NULL,
88 `residence` varchar(255) DEFAULT NULL,
89 `id_language` int(11) DEFAULT NULL,
90 `id_school` int(11) DEFAULT NULL,
91 PRIMARY KEY (`id`),
92 KEY `id_language` (`id_language`),
93 KEY `id_school` (`id_school`),
94 CONSTRAINT `student_ibfk_1` FOREIGN KEY (`id_language`) REFERENCES `language` (`id_language`),
95 CONSTRAINT `student_ibfk_2` FOREIGN KEY (`id_school`) REFERENCES `school` (`id_school`)
96) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
97/*!40101 SET character_set_client = @saved_cs_client */;
98
99--
100-- Dumping data for table `student`
101--
102
103LOCK TABLES `student` WRITE;
104/*!40000 ALTER TABLE `student` DISABLE KEYS */;
105INSERT INTO `student` VALUES (1,'Coyard','florentin','impasse ....',24,'tournes',1,1),(2,'Raymond','Fabien','pas loin',28,'Reims',1,1),(3,'DSC','Corentin','pas loin non plus',25,'Reims',2,2),(4,'Google','Chrome','rue de Londre',100,'Paris',2,2),(5,'Loris','M\'en Fou','je ne sais pas',50,'Paris',3,2);
106/*!40000 ALTER TABLE `student` ENABLE KEYS */;
107UNLOCK TABLES;
108/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
109
110/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
111/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
112/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
113/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
114/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
115/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
116/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
117
118-- Dump completed on 2018-11-26 15:10:42