 -- ----------------------------
 DROP TABLE IF EXISTS `inspector`;
 CREATE TABLE `inspector` (
-  `username` char(20) NOT NULL,
+  `username` char(20) DEFAULT NULL,
   `password` varchar(45) DEFAULT NULL,
-  `inspector_id` int(45) DEFAULT NULL,
+  `inspector_id` int(45) NOT NULL AUTO_INCREMENT,
   `title` varchar(45) DEFAULT NULL,
   `first_name` varchar(45) DEFAULT NULL,
   `last_name` varchar(45) DEFAULT NULL,
   `email` varchar(45) DEFAULT NULL,
   `capacity` int(45) DEFAULT NULL,
-  `timetable_id` int(45) DEFAULT NULL,
-  `keywords` varchar(255) DEFAULT NULL,
-  PRIMARY KEY (`username`),
-  KEY `timetable_id` (`timetable_id`),
-  CONSTRAINT `inspector_ibfk_1` FOREIGN KEY (`timetable_id`) REFERENCES `timetable` (`timetable_id`)
+  PRIMARY KEY (`inspector_id`),
+  KEY `username` (`username`)
+) ENGINE=InnoDB AUTO_INCREMENT=383 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of inspector
+-- ----------------------------
+INSERT INTO `inspector` VALUES ('Zhiwei', 'Zhiwei', '1', 'Mr.', 'Zhiwei', 'Liu', null, null);
+
+-- ----------------------------
+-- Table structure for inspector_keyword
+-- ----------------------------
+DROP TABLE IF EXISTS `inspector_keyword`;
+CREATE TABLE `inspector_keyword` (
+  `inspector_keyword_id` int(20) NOT NULL AUTO_INCREMENT,
+  `inspector_id` int(20) DEFAULT NULL,
+  `keyword_id` int(20) DEFAULT NULL,
+  PRIMARY KEY (`inspector_keyword_id`)
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 -- ----------------------------
--- Records of inspector
--- ----------------------------
-INSERT INTO `inspector` VALUES ('inspector', '123', null, 'Mr.', 'Zhiwei', 'Liu', null, null, null, null);
+-- Records of inspector_keyword
+-- ----------------------------
+
+-- ----------------------------
+-- Table structure for keyword
+-- ----------------------------
+DROP TABLE IF EXISTS `keyword`;
+CREATE TABLE `keyword` (
+  `keyword_id` int(20) NOT NULL AUTO_INCREMENT,
+  `keyword_name` varchar(45) DEFAULT NULL,
+  `module_id` int(20) DEFAULT NULL,
+  PRIMARY KEY (`keyword_id`)
+) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+
+-- ----------------------------
+-- Records of keyword
+-- ----------------------------
+INSERT INTO `keyword` VALUES ('1', 'artificial', '26581');
+INSERT INTO `keyword` VALUES ('2', 'www', '26581');
 
 -- ----------------------------
 -- Table structure for module
 -- ----------------------------
 DROP TABLE IF EXISTS `module`;
 CREATE TABLE `module` (
-  `module_id` int(20) NOT NULL,
+  `module_id` int(20) NOT NULL AUTO_INCREMENT,
   `module_name` varchar(45) DEFAULT NULL,
   `year` varchar(255) DEFAULT NULL,
   `start_date` datetime(6) DEFAULT NULL,

-- ----------------------------
DROP TABLE IF EXISTS `course`;
CREATE TABLE `course` (
  `course_id` int(20) NOT NULL,
  `course_name` varchar(45) DEFAULT NULL,
  `course_description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`course_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of course

-- ----------------------------
DROP TABLE IF EXISTS `first_inspection`;
CREATE TABLE `first_inspection` (
  `first_inspection_id` int(20) NOT NULL AUTO_INCREMENT,
  `student_id` int(20) DEFAULT '0',
  `inspector_id` int(20) DEFAULT NULL,
  `module_id` int(20) DEFAULT NULL,
  `date` datetime(6) DEFAULT NULL,
  `first_inspectioncol` varchar(45) DEFAULT NULL,
  PRIMARY KEY (`first_inspection_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- ----------------------------
