-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase_student_db.sql
86 lines (74 loc) · 3.64 KB
/
database_student_db.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
-- MySQL dump 10.13 Distrib 5.7.17, for Linux (x86_64)
--
-- Host: localhost Database: student_db
-- ------------------------------------------------------
-- Server version 5.7.17-0ubuntu0.16.04.1
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
DROP DATABASE IF EXISTS `student_db`;
CREATE DATABASE `student_db` CHARACTER SET utf8 COLLATE utf8_general_ci;
--
-- Table structure for table `student`
--
DROP TABLE IF EXISTS `student`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`dateOfBirth` date NOT NULL,
`firstName` varchar(255) NOT NULL,
`homeAddress` varchar(255) NOT NULL,
`lastName` varchar(255) NOT NULL,
`middleName` varchar(255) DEFAULT NULL,
`studentGroup_id` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `FK_pttwvms56jd6kpud0b3v2178x` (`studentGroup_id`),
CONSTRAINT `FK_pttwvms56jd6kpud0b3v2178x` FOREIGN KEY (`studentGroup_id`) REFERENCES `student_group` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `student`
--
LOCK TABLES `student` WRITE;
/*!40000 ALTER TABLE `student` DISABLE KEYS */;
INSERT INTO `student` VALUES (1,'1996-12-05','Andrey','Bobrujsk','Bobkov','Valerievich',1),(3,'1997-07-28','Лена','Гомель','Дюбина','Александровна ',2),(4,'2017-02-25','1','1','1','1',1),(5,'2017-02-25','2','2','2','2',1),(6,'2017-02-25','3','3','3','3',1),(7,'2017-02-25','4','4','4','4',1),(8,'2017-02-25','5','5','5','5',1),(9,'2017-02-25','6','6','6','6',1),(10,'2017-02-25','7','7','7','7',1),(11,'2017-02-25','8','8','8','8',1),(12,'2017-02-25','9','9','9','9',1),(13,'2017-02-25','10','10','10','10',1);
/*!40000 ALTER TABLE `student` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `student_group`
--
DROP TABLE IF EXISTS `student_group`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `student_group` (
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `UK_c5v7ohj5x0kjm1dssnlnx5evw` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
-- Dumping data for table `student_group`
--
LOCK TABLES `student_group` WRITE;
/*!40000 ALTER TABLE `student_group` DISABLE KEYS */;
INSERT INTO `student_group` VALUES (1,'421701'),(2,'421702'),(3,'421703'),(4,'521701'),(5,'521702'),(6,'521703'),(7,'621701'),(8,'621702');
/*!40000 ALTER TABLE `student_group` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-- Dump completed on 2017-03-08 19:38:13