/*
Navicat MySQL Data Transfer

Source Server         : localhost@mysql
Source Server Version : 50505
Source Host           : localhost:3306
Source Database       : school

Target Server Type    : MYSQL
Target Server Version : 50505
File Encoding         : 65001

Date: 2023-07-11 15:25:25
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for course_registrations
-- ----------------------------
DROP TABLE IF EXISTS `course_registrations`;
CREATE TABLE `course_registrations` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `student_id` int(11) DEFAULT NULL,
  `subject_id` int(11) DEFAULT NULL,
  `semester` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '202301',
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of course_registrations
-- ----------------------------
INSERT INTO `course_registrations` VALUES ('1', '5', '1', '2023-01', '2023-07-11 14:43:00');
INSERT INTO `course_registrations` VALUES ('2', '5', '2', '2023-01', '2023-07-11 14:42:55');
INSERT INTO `course_registrations` VALUES ('3', '5', '3', '2023-01', '2023-07-11 14:42:56');
INSERT INTO `course_registrations` VALUES ('4', '5', '4', '2023-01', '2023-07-11 14:42:58');
INSERT INTO `course_registrations` VALUES ('5', '5', '5', '2023-01', '2023-07-11 14:42:57');
INSERT INTO `course_registrations` VALUES ('6', '5', '1', '2022-02', '2023-07-11 14:43:30');
INSERT INTO `course_registrations` VALUES ('7', '5', '5', '2022-02', '2023-07-11 14:43:33');
INSERT INTO `course_registrations` VALUES ('8', '1', '1', '2023-01', '2023-07-11 14:43:55');
INSERT INTO `course_registrations` VALUES ('9', '1', '2', '2023-01', '2023-07-11 14:43:55');
INSERT INTO `course_registrations` VALUES ('10', '1', '3', '2023-01', '2023-07-11 14:43:58');

-- ----------------------------
-- Table structure for students
-- ----------------------------
DROP TABLE IF EXISTS `students`;
CREATE TABLE `students` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `first_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `last_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `age` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of students
-- ----------------------------
INSERT INTO `students` VALUES ('1', 'Anh', 'Nguyen The', 'Ho Chi Minh', '18', '2023-07-11 14:39:23');
INSERT INTO `students` VALUES ('2', 'Ngan', 'Pham Nha', 'Da Nang', '18', '2023-07-11 14:39:24');
INSERT INTO `students` VALUES ('3', 'Binh', 'Pham Thanh', 'Dong Nai', '22', '2023-07-11 14:39:26');
INSERT INTO `students` VALUES ('4', 'Cong', 'Tran Ngoc', 'Ho Chi Minh', '21', '2023-07-11 14:39:28');
INSERT INTO `students` VALUES ('5', 'Hieu', 'Nguyen Minh', 'Tien Giang', '20', '2023-07-11 14:39:29');
INSERT INTO `students` VALUES ('6', 'Van', 'Tran Bao', 'Ha Tinh', '20', '2023-07-11 14:39:30');
INSERT INTO `students` VALUES ('7', 'Vy', 'Nguyen Ha', 'Thanh Hoa', '19', '2023-07-11 14:39:33');
INSERT INTO `students` VALUES ('8', 'My', 'Nguyen Ha', 'Binh Thuan', '19', '2023-07-11 14:39:32');
INSERT INTO `students` VALUES ('9', 'Son', 'Nguyen Thai', 'Ca Mau', '19', '2023-07-11 14:39:33');
INSERT INTO `students` VALUES ('10', 'Tien', 'Pham Minh', 'Dong Nai', '20', '2023-07-11 14:39:59');
INSERT INTO `students` VALUES ('11', 'Thu', 'Nguyen Ngoc', 'Ho Chi Minh', '20', '2023-07-11 14:39:35');
INSERT INTO `students` VALUES ('12', 'Nhu', 'Vu Quynh', 'Da Nang', '23', '2023-07-11 14:39:37');
INSERT INTO `students` VALUES ('13', 'Khanh', 'Tran Quoc', 'Ben Tre', '24', '2023-07-11 14:39:38');
INSERT INTO `students` VALUES ('14', 'Nhien', 'Nguyen An', 'Tay Ninh', '24', '2023-07-11 14:39:39');
INSERT INTO `students` VALUES ('15', 'Tung', 'Nguyen Son', 'Dong Thap', '20', '2023-07-11 14:40:01');
INSERT INTO `students` VALUES ('16', 'Lam', 'Ho Tung', 'Ho Chi Minh', '21', '2023-07-11 14:39:41');
INSERT INTO `students` VALUES ('17', 'Lam', 'Nguyen Van', 'Vung Tau', '21', '2023-07-11 14:39:42');
INSERT INTO `students` VALUES ('18', 'Hoang', 'Nguyen Minh', 'Ninh Thuan', '19', '2023-07-11 14:39:46');
INSERT INTO `students` VALUES ('19', 'Khanh', 'Vo Nhat', 'Lam Dong', '20', '2023-07-11 14:39:49');
INSERT INTO `students` VALUES ('20', 'Nhung', 'Nguyen Thi Tuyet', 'Ha Nai', '22', '2023-07-11 14:39:52');
INSERT INTO `students` VALUES ('21', 'Nam', 'Nguyen Thanh', 'Ho Chi Minh', '20', '2023-07-11 14:39:58');

-- ----------------------------
-- Table structure for subjects
-- ----------------------------
DROP TABLE IF EXISTS `subjects`;
CREATE TABLE `subjects` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `credits` int(11) DEFAULT NULL COMMENT 'Số tín chỉ',
  `created_at` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of subjects
-- ----------------------------
INSERT INTO `subjects` VALUES ('1', 'Toán đại cương', '3', '2023-07-11 14:40:47');
INSERT INTO `subjects` VALUES ('2', 'Lý đại cương', '3', '2023-07-11 14:40:54');
INSERT INTO `subjects` VALUES ('3', 'Hóa đại cương', '3', '2023-07-11 14:40:56');
INSERT INTO `subjects` VALUES ('4', 'Mac Lenin', '5', '2023-07-11 14:46:42');
INSERT INTO `subjects` VALUES ('5', 'Tiếng Anh B1', '3', '2023-07-11 14:46:44');
