技术:jsp servlet mysql
数据库表:
CREATE TABLE tb_course
(
id
int(10) unsigned NOT NULL auto_increment COMMENT ‘课程编号’,
name
varchar(40) NOT NULL COMMENT ‘课程名称’,
schooltime
varchar(40) NOT NULL COMMENT ‘上课时间’,
addr
varchar(50) NOT NULL COMMENT ‘上课地点’,
credit
decimal(3,0) NOT NULL COMMENT ‘课程学分’,
courseInfo
varchar(100) NOT NULL COMMENT ‘课程介绍’,
teacherName
varchar(20) NOT NULL COMMENT ‘授课教师’,
teacherInfo
varchar(100) NOT NULL COMMENT ‘教师介绍’,
isFinish
bit(1) NOT NULL COMMENT ‘是否结课’,
specialtyId
int(10) unsigned NOT NULL COMMENT ‘专业编号’,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=gbk;
–
– Dumping data for table tb_course
/*!40000 ALTER TABLE tb_course
DISABLE KEYS /;
INSERT INTO tb_course
(id
,name
,schooltime
,addr
,credit
,courseInfo
,teacherName
,teacherInfo
,isFinish
,specialtyId
) VALUES
(1,‘大学英语1’,‘每周二上午8点到12点’,‘文科楼第一教室’,‘5’,‘英语基础课程’,‘张老师’,‘拥有多年教学经验的优秀教师’,0x01,1),
(2,‘平面设计’,‘每周一、周四上午’,‘文科楼第三教室’,‘4’,‘设计基础课程’,‘李老师’,‘一位优秀的教师’,0x01,1),
(3,‘国内贸易’,‘每周一全天’,‘文科楼第一教室’,‘4’,‘这里是介绍’,‘孙老师’,‘新来的一个老师’,0x01,2),
(4,‘大学英语1’,‘每周一、周四上午’,‘文科楼第一教室’,‘5’,‘这里是介绍’,‘张老师’,‘新来的一个老师’,0x01,2);
/!40000 ALTER TABLE tb_course
ENABLE KEYS */;
–
– Definition of table tb_specialty
DROP TABLE IF EXISTS tb_specialty
;
CREATE TABLE tb_specialty
(
id
int(10) unsigned NOT NULL auto_increment COMMENT ‘专业编号’,
enterYear
varchar(4) NOT NULL COMMENT ‘入学年份’,
name
varchar(40) NOT NULL COMMENT ‘专业名称’,
langthYear
varchar(10) NOT NULL COMMENT ‘学制’,
isFinish
bit(1) NOT NULL COMMENT ‘是否毕业’,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=gbk;
–
– Dumping data for table tb_specialty
/*!40000 ALTER TABLE tb_specialty
DISABLE KEYS /;
INSERT INTO tb_specialty
(id
,enterYear
,name
,langthYear
,isFinish
) VALUES
(1,‘2005’,‘美术装潢设计’,‘2’,0x00),
(2,‘2005’,‘进出口贸易’,‘4’,0x00);
/!40000 ALTER TABLE tb_specialty
ENABLE KEYS */;
–
– Definition of table tb_stucourse
DROP TABLE IF EXISTS tb_stucourse
;
CREATE TABLE tb_stucourse
(
stuID
int(10) unsigned NOT NULL COMMENT ‘学生编号’,
courseID
int(10) unsigned NOT NULL COMMENT ‘课程编号’,
id
int(10) unsigned NOT NULL auto_increment,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=gbk;
–
– Dumping data for table tb_stucourse
/*!40000 ALTER TABLE tb_stucourse
DISABLE KEYS /;
INSERT INTO tb_stucourse
(stuID
,courseID
,id
) VALUES
(6,1,3),
(11,1,4),
(10,1,5),
(12,1,6),
(12,2,7);
/!40000 ALTER TABLE tb_stucourse
ENABLE KEYS */;
–
– Definition of table tb_stuuser
DROP TABLE IF EXISTS tb_stuuser
;
CREATE TABLE tb_stuuser
(
id
int(10) unsigned NOT NULL auto_increment COMMENT ‘学生编号’,
stuName
varchar(20) NOT NULL COMMENT ‘学生姓名’,
stuNo
varchar(15) NOT NULL COMMENT ‘学号’,
specialtyId
int(10) unsigned NOT NULL COMMENT ‘专业编号’,
stuSex
varchar(2) NOT NULL COMMENT ‘性别’,
birthday
varchar(10) NOT NULL COMMENT ‘出生日期’,
homeAddr
varchar(50) NOT NULL COMMENT ‘家庭住址’,
tel
varchar(20) NOT NULL COMMENT ‘联系电话’,
addr
varchar(50) NOT NULL COMMENT ‘现住址’,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=gbk;
–
– Dumping data for table tb_stuuser
/!40000 ALTER TABLE tb_stuuser
DISABLE KEYS /;
INSERT INTO tb_stuuser
(id
,stuName
,stuNo
,specialtyId
,stuSex
,birthday
,homeAddr
,tel
,addr
) VALUES
(5,‘aa’,‘123456’,1,‘男’,‘1981-08-17’,‘吉林省四平市’,'87793*’,‘吉林省长春市’),
(6,‘张三’,‘654321’,1,‘男’,‘1981-08-01’,‘吉林省四平市’,‘0431-84972266’,‘吉林省长春市’),
(7,‘bbb’,‘555555’,1,‘男’,‘1981-08-01’,‘吉林省四平市’,‘0431-84972266’,‘吉林省长春市’),
(10,‘555’,‘005’,1,‘男’,‘1981-08-01’,‘吉林省四平市’,‘0431-84972266’,‘吉林省长春市’),
(11,‘666’,‘006’,1,‘男’,‘1981-08-01’,‘吉林省四平市’,‘0431-84972266’,‘吉林省长春市’),
(12,‘777’,‘007’,1,‘男’,‘1981-08-01’,‘吉林省四平市’,‘0431-84972266’,‘吉林省长春市’);
/*!40000 ALTER TABLE tb_stuuser
ENABLE KEYS */;
–
– Definition of table tb_userlogin
DROP TABLE IF EXISTS tb_userlogin
;
CREATE TABLE tb_userlogin
(
id
int(10) unsigned NOT NULL auto_increment COMMENT ‘用户编号’,
loginName
varchar(20) NOT NULL COMMENT ‘登录名称’,
pwd
varchar(20) NOT NULL COMMENT ‘登录密码’,
type
varchar(1) NOT NULL COMMENT ‘用户类型’,
mail
varchar(50) NOT NULL,
PRIMARY KEY (id
)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=gbk;