使用Mybatis框架对web项目进行优化

使用Mybatis框架对web项目进行优化

具体项目请下载链接

链接:https://pan.baidu.com/s/1f7NyU-SiriARUjZSaNo7Xg 密码:4gq2

数据库名 itcast 表名 class student


student


/*
Navicat MySQL Data Transfer

Source Server         : APP
Source Server Version : 50722
Source Host           : 127.0.0.1:3306
Source Database       : itcast

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

Date: 2018-08-07 12:40:29
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for student
-- ----------------------------
DROP TABLE IF EXISTS `student`;
CREATE TABLE `student` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) DEFAULT NULL,
  `age` int(11) DEFAULT NULL,
  `sex` int(20) DEFAULT NULL,
  `cid` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `studentfk01` (`cid`),
  CONSTRAINT `studentfk01` FOREIGN KEY (`cid`) REFERENCES `class` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of student
-- ----------------------------
INSERT INTO `student` VALUES ('13', '王五', '32', '0', '18');
INSERT INTO `student` VALUES ('14', '赵六', '18', '0', '12');
INSERT INTO `student` VALUES ('15', '张三', '32', '1', '11');
INSERT INTO `student` VALUES ('16', '张二', '18', '0', '17');

class


/*
Navicat MySQL Data Transfer

Source Server         : APP
Source Server Version : 50722
Source Host           : 127.0.0.1:3306
Source Database       : itcast

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

Date: 2018-08-07 12:40:41
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for class
-- ----------------------------
DROP TABLE IF EXISTS `class`;
CREATE TABLE `class` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(20) DEFAULT NULL,
  `size` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;

-- ----------------------------
-- Records of class
-- ----------------------------
INSERT INTO `class` VALUES ('2', 'ts1702', '15');
INSERT INTO `class` VALUES ('11', 'ts1707', '21');
INSERT INTO `class` VALUES ('12', 'ts1706', '12');
INSERT INTO `class` VALUES ('17', 'ts1709 ', '2');
INSERT INTO `class` VALUES ('18', 'ts1707', '20');

猜你喜欢

转载自blog.csdn.net/Stay_Hungry_Stay/article/details/81479281