教务管理系统之数据库结构

 

teachmanger

&nbsp

  • answer

  • course

  • homework

  • manger

  • stucourse

  • student

  • teacher

  • teacourse

  • video

 

&nbsp

answer &nbsp
Fields
Field Type Collation Null Key Default Extra Privileges Comment

stuid

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

学生学号

homeworkid

int(4) unsigned

(NULL)

NO

 

(NULL)

 

select,insert,update,references

作业编号

score

int(3)

(NULL)

YES

 

(NULL)

 

select,insert,update,references

分数

answerfile

longblob

(NULL)

NO

 

(NULL)

 

select,insert,update,references

答案文件

submittime

datetime

(NULL)

NO

 

(NULL)

 

select,insert,update,references

提交时间

Indexes

Back

 

&nbsp

course &nbsp
Fields
Field Type Collation Null Key Default Extra Privileges Comment

courseid

int(4) unsigned

(NULL)

NO

PRI

(NULL)

auto_increment

select,insert,update,references

课程编号

coursename

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

课程名

coursenumber

int(4)

(NULL)

NO

 

0

 

select,insert,update,references

已选课人数

courselimit

int(4)

(NULL)

NO

 

(NULL)

 

select,insert,update,references

课程限选人数

courseday

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

课程星期

coursetime

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

课程时间段

courseroom

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

课程教室

coursekind

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

课程种类

Indexes
Table Non
unique
Key
name
Seq
in
index
Column
name
Collation Cardinality Sub
part
Packed Null Index
type
Comment Index
comment

course

0

PRIMARY

1

courseid

A

130

(NULL)

(NULL)

 

BTREE

 

 

Back

 

&nbsp

homework &nbsp
Fields
Field Type Collation Null Key Default Extra Privileges Comment

homeworkid

int(4) unsigned

(NULL)

NO

PRI

(NULL)

auto_increment

select,insert,update,references

作业编号

courseid

int(4) unsigned

(NULL)

NO

 

(NULL)

 

select,insert,update,references

课程编号

startline

date

(NULL)

NO

 

(NULL)

 

select,insert,update,references

作业开始时间

endline

date

(NULL)

NO

 

(NULL)

 

select,insert,update,references

作业结束时间

homeworkrequest

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

作业要求

homeworkfile

longblob

(NULL)

YES

 

(NULL)

 

select,insert,update,references

作业文件

Indexes
Table Non
unique
Key
name
Seq
in
index
Column
name
Collation Cardinality Sub
part
Packed Null Index
type
Comment Index
comment

homework

0

PRIMARY

1

homeworkid

A

1

(NULL)

(NULL)

 

BTREE

 

 

Back

 

&nbsp

manger &nbsp
Fields
Field Type Collation Null Key Default Extra Privileges Comment

mangerid

varchar(255)

utf8_general_ci

NO

PRI

(NULL)

 

select,insert,update,references

管理员ID

mangerpwd

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

管理员密码

Indexes
Table Non
unique
Key
name
Seq
in
index
Column
name
Collation Cardinality Sub
part
Packed Null Index
type
Comment Index
comment

manger

0

PRIMARY

1

mangerid

A

0

(NULL)

(NULL)

 

BTREE

 

 

Back

 

&nbsp

stucourse &nbsp
Fields
Field Type Collation Null Key Default Extra Privileges Comment

stuid

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

学生学号

courseid

int(4)

(NULL)

NO

 

(NULL)

 

select,insert,update,references

课程编号

coursescore

int(3)

(NULL)

NO

 

-1

 

select,insert,update,references

课程分数

Indexes

Back

 

&nbsp

student &nbsp
Fields
Field Type Collation Null Key Default Extra Privileges Comment

stuid

varchar(255)

utf8_general_ci

NO

PRI

(NULL)

 

select,insert,update,references

学号

stupwd

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

密码

stuname

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

姓名

stusex

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

性别

sturace

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

民族

stuorigin

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

籍贯

stuenrollment

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

入学年

stucollege

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

学院

stumajor

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

专业

stuclass

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

班级

stuphone

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

电话

stuphoto

longblob

(NULL)

YES

 

(NULL)

 

select,insert,update,references

照片

stustate

tinyint(1)

(NULL)

NO

 

0

 

select,insert,update,references

账号是否激活

Indexes
Table Non
unique
Key
name
Seq
in
index
Column
name
Collation Cardinality Sub
part
Packed Null Index
type
Comment Index
comment

student

0

PRIMARY

1

stuid

A

28

(NULL)

(NULL)

 

BTREE

 

 

Back

 

&nbsp

teacher &nbsp
Fields
Field Type Collation Null Key Default Extra Privileges Comment

teaid

varchar(255)

utf8_general_ci

NO

PRI

(NULL)

 

select,insert,update,references

老师工号

teapwd

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

密码

teaname

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

姓名

teasex

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

性别

tearace

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

民族

teaorigin

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

籍贯

teacollege

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

学院

teapost

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

职位

teagraduation

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

毕业学校

teadegree

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

学位

teaphone

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

电话

teaphoto

longblob

(NULL)

YES

 

(NULL)

 

select,insert,update,references

照片

teastate

tinyint(1)

(NULL)

NO

 

0

 

select,insert,update,references

账号是否被激活

Indexes
Table Non
unique
Key
name
Seq
in
index
Column
name
Collation Cardinality Sub
part
Packed Null Index
type
Comment Index
comment

teacher

0

PRIMARY

1

teaid

A

30

(NULL)

(NULL)

 

BTREE

 

 

Back

 

&nbsp

teacourse &nbsp
Fields
Field Type Collation Null Key Default Extra Privileges Comment

teaid

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

老师工号

courseid

int(4)

(NULL)

NO

 

(NULL)

 

select,insert,update,references

课程号

Indexes

Back

 

&nbsp

video &nbsp
Fields
Field Type Collation Null Key Default Extra Privileges Comment

videoid

int(4) unsigned

(NULL)

NO

PRI

(NULL)

auto_increment

select,insert,update,references

视频编号

courseid

int(4) unsigned

(NULL)

NO

 

(NULL)

 

select,insert,update,references

课程编号

videoname

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

视频标题

videointroducation

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

视频简介

videocover

longblob

(NULL)

NO

 

(NULL)

 

select,insert,update,references

视频封面

videofile

varchar(255)

utf8_general_ci

NO

 

(NULL)

 

select,insert,update,references

视频文件

videotime

date

(NULL)

NO

 

(NULL)

 

select,insert,update,references

上传时间

Indexes
Table Non
unique
Key
name
Seq
in
index
Column
name
Collation Cardinality Sub
part
Packed Null Index
type
Comment Index
comment

video

0

PRIMARY

1

videoid

A

0

(NULL)

(NULL)

 

BTREE

 

 

Back

CREATE TABLE `answer` (
  `stuid` varchar(255) NOT NULL COMMENT '学生学号',
  `homeworkid` int(4) unsigned NOT NULL COMMENT '作业编号',
  `score` int(3) DEFAULT NULL COMMENT '分数',
  `answerfile` longblob NOT NULL COMMENT '答案文件',
  `submittime` datetime NOT NULL COMMENT '提交时间'
) ENGINE=InnoDB DEFAULT CHARSET=utf8

CREATE TABLE `course` (
  `courseid` int(4) unsigned NOT NULL AUTO_INCREMENT COMMENT '课程编号',
  `coursename` varchar(255) NOT NULL COMMENT '课程名',
  `coursenumber` int(4) NOT NULL DEFAULT '0' COMMENT '已选课人数',
  `courselimit` int(4) NOT NULL COMMENT '课程限选人数',
  `courseday` varchar(255) NOT NULL COMMENT '课程星期',
  `coursetime` varchar(255) NOT NULL COMMENT '课程时间段',
  `courseroom` varchar(255) NOT NULL COMMENT '课程教室',
  `coursekind` varchar(255) NOT NULL COMMENT '课程种类',
  PRIMARY KEY (`courseid`)
) ENGINE=InnoDB AUTO_INCREMENT=131 DEFAULT CHARSET=utf8

CREATE TABLE `homework` (
  `homeworkid` int(4) unsigned NOT NULL AUTO_INCREMENT COMMENT '作业编号',
  `courseid` int(4) unsigned NOT NULL COMMENT '课程编号',
  `startline` date NOT NULL COMMENT '作业开始时间',
  `endline` date NOT NULL COMMENT '作业结束时间',
  `homeworkrequest` varchar(255) NOT NULL COMMENT '作业要求',
  `homeworkfile` longblob COMMENT '作业文件',
  PRIMARY KEY (`homeworkid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8

CREATE TABLE `manger` (
  `mangerid` varchar(255) NOT NULL COMMENT '管理员ID',
  `mangerpwd` varchar(255) NOT NULL COMMENT '管理员密码',
  PRIMARY KEY (`mangerid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

CREATE TABLE `stucourse` (
  `stuid` varchar(255) NOT NULL COMMENT '学生学号',
  `courseid` int(4) NOT NULL COMMENT '课程编号',
  `coursescore` int(3) NOT NULL DEFAULT '-1' COMMENT '课程分数'
) ENGINE=InnoDB DEFAULT CHARSET=utf8

CREATE TABLE `student` (
  `stuid` varchar(255) NOT NULL COMMENT '学号',
  `stupwd` varchar(255) NOT NULL COMMENT '密码',
  `stuname` varchar(255) NOT NULL COMMENT '姓名',
  `stusex` varchar(255) NOT NULL COMMENT '性别',
  `sturace` varchar(255) NOT NULL COMMENT '民族',
  `stuorigin` varchar(255) NOT NULL COMMENT '籍贯',
  `stuenrollment` varchar(255) NOT NULL COMMENT '入学年',
  `stucollege` varchar(255) NOT NULL COMMENT '学院',
  `stumajor` varchar(255) NOT NULL COMMENT '专业',
  `stuclass` varchar(255) NOT NULL COMMENT '班级',
  `stuphone` varchar(255) NOT NULL COMMENT '电话',
  `stuphoto` longblob COMMENT '照片',
  `stustate` tinyint(1) NOT NULL DEFAULT '0' COMMENT '账号是否激活',
  PRIMARY KEY (`stuid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

CREATE TABLE `teacher` (
  `teaid` varchar(255) NOT NULL COMMENT '老师工号',
  `teapwd` varchar(255) NOT NULL COMMENT '密码',
  `teaname` varchar(255) NOT NULL COMMENT '姓名',
  `teasex` varchar(255) NOT NULL COMMENT '性别',
  `tearace` varchar(255) NOT NULL COMMENT '民族',
  `teaorigin` varchar(255) NOT NULL COMMENT '籍贯',
  `teacollege` varchar(255) NOT NULL COMMENT '学院',
  `teapost` varchar(255) NOT NULL COMMENT '职位',
  `teagraduation` varchar(255) NOT NULL COMMENT '毕业学校',
  `teadegree` varchar(255) NOT NULL COMMENT '学位',
  `teaphone` varchar(255) NOT NULL COMMENT '电话',
  `teaphoto` longblob COMMENT '照片',
  `teastate` tinyint(1) NOT NULL DEFAULT '0' COMMENT '账号是否被激活',
  PRIMARY KEY (`teaid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

CREATE TABLE `teacourse` (
  `teaid` varchar(255) NOT NULL COMMENT '老师工号',
  `courseid` int(4) NOT NULL COMMENT '课程号'
) ENGINE=InnoDB DEFAULT CHARSET=utf8

CREATE TABLE `video` (
  `videoid` int(4) unsigned NOT NULL AUTO_INCREMENT COMMENT '视频编号',
  `courseid` int(4) unsigned NOT NULL COMMENT '课程编号',
  `videoname` varchar(255) NOT NULL COMMENT '视频标题',
  `videointroducation` varchar(255) NOT NULL COMMENT '视频简介',
  `videocover` longblob NOT NULL COMMENT '视频封面',
  `videofile` varchar(255) NOT NULL COMMENT '视频文件',
  `videotime` date NOT NULL COMMENT '上传时间',
  PRIMARY KEY (`videoid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8

 

posted @ 2023-06-10 11:20  突破铁皮  阅读(39)  评论(0编辑  收藏  举报