Java经典基础项目——《学生教务系统》立项需求说明书

简介: Java经典基础项目——《学生教务系统》立项需求说明书

Java经典基础项目《学生教务系统》立项需求说明书

一、需求背景

《学生教务系统》 系统设计以方便快捷和安全为出发点,放弃传统的人工记录对学生信息管理的缺陷和不足, 采用全新的方式使学校对学生信息进行存储和维护,增加管理效率。


本系统大体为教务学生管理系统 、并且赋予了管理员很多功能来操作这个系统,包括:学生管理,小组管理,班级管理等功能;通过这些功能模块的设计,满足了老师对学生的信息进行管控所需的功能。


系统采用 b/s(浏览器/服务器) 三层结构 ,对动态页面的制作采用了 JSP+Ajax 技术,为了实现管理系统的安全可靠以及对有些代码可以进行重复使用考虑, 对程序的重要代码进行封装时采用 Java Bean。本系统贯彻以人为本的思想,实用性高。


二、产品目标

学生信息的管理工作变得越来越庞大和繁冗,效率也低。为了充分利用互联网带给人们的便利,更好地提高教学管理管理工作的效率,使学生和教职员工能更方便地进行信息查询活动,特开发此教学管理系统。本软件通过权限识别登录到该系统,权限不同享有的功能就又说差异,来实现日常的学生信息的管理。


三、《学生教务系统》项目介绍:

1、开发环境


image.png

2、《百知教务系统》的总体功能


image.png

(3)用户角色描述


image.png

四、具体需求

1、功能划分

  本系统总体功能上是B/S 结构的Windows应用程序!

2、项目整体功能框架


image.png

3、概念数据模型CMD

CMD是实体与实体之间关系的模型(使用PdShell 设计)



image.png

1. 表的数量   和模块有关    6表
2. 确认字段
       用户表:id 用户名 密码 角色
       城市表:id 地址名
       标签表: id 标签名,标签创建时间,标签类型
       班级表: id 班级名称,班级Logo(图片路径)
       小组表: id 小组名称,创建时间
       学生表: id 名字,生日,QQ,电话,星座,生肖
3. 确认关系
     关系:
        学生-班级:    多对一   外键列加在学生表  clazz_id
        学生-小组:    多对一   外键列加在学生表  gropu_id
        学生-就业城市: 多对一   外键列加在学生表  city_id
        学生-标签:    多对多   中间表(关系表)
        班级-标签:    多对一   外键列加在班级表  clazz_id
        班级-小组:    一对多   外键列加在小组表  group_id

五、功能需求

1、用户登录/注册板块

(1)用户/管理员表设计(t_user)


image.png

注意:邮箱用户注册后向注册用户发送邮箱,激活后可以使用该账户进行登录,否则注册失效


--用户表
create table t_user(
  id int primary key auto_increment,
  -- 其中用户名通过Ajax注册查询用户名是否重复进行判断
  username varchar(40) not null unique,
  password varchar(40) not null,
  --'用户 0 管理员 1',
  role int not null,
  --用户的邮箱!用于激活使用!
  email varchar(50) not null,
  --'邮件激活码',
  code  Varchar(100),
  -- '用户的激活状态 0 未激活 1 激活',
  status  int
)

(2)登录功能实现


image.png

1. 用户登录之前用户名必须是在注册时通过邮箱激活 后的,否则不能登录, 返回提示信息:用户名输入错误~~
2. 如果用户名输入错误 返回提示信息:用户名输入错误~~
3. 如果验证码输错    返回提示信息: 验证码输入错误~~~
4. 如果用户名,验证码正确  返回提示信息: 密码输入错误~~

(3)注册功能实现


image.png

1.由于原型模型,没有设计“邮箱字段”,特加到了用户上面,具体开发中,邮箱放在用户下
2. 注册进行提交后,会跳转到请去邮箱激活用户页面
3.激活成功后会跳转到登录
注意:输入用户的时候会通过Ajax实现用户是否存在验证,
     如果用户名存在,会提醒你:"用户已经存在,请重新输入"

(4)用户板块功能流程图


image.png

1. 注册页面进行注册
2. 跳转到请求激活页面
3. 邮箱页面请求激活
4. 激活后跳转到已经激活页面
5. 激活后跳转到登录页面

2、城市管理板块

(1)城市管理数据库(t_city)


image.png

注意:其中Studnet表中有t_city,所以我们建表时最好把城市表放在第一个建的表


create table t_city(
  id int primary key auto_increment ,
  name varchar(20) not null  unique
)

(2)城市功能示意图


image.png

(3)城市功能详情

1. 添加城市:只需要添加城市名称,使用Ajax确定城市唯一
2. 删除城市: 删除"城市"字段之前我们一定得把选中当前城市就业的学生删除,
             或者让该学生修改修改就业城市(使用Ajax判断是否删除)

3、标签管理板块

(1)标签管理数据库设计(t_mark)


image.png

注:其中学生表,班级表里面均有标签,我们建表之前最好在学生表,班级表之前建学生表


--标签表
create table t_mark(
  m_id int primary key auto_increment,
  m_name varchar(20) not null,
  m_time date,
  m_type varchar(20)
)

(2)标签功能示意图


image.png

(3)标签功能详情

1. 添加标签: 添加标签注意添加标签名称,标签类型(标签类型包含:学生/班级两种类型 )
2. 删除标签: 删除标签名字字段之前之前,我们得把对应的学生表,班级表中选中相关标签的班级和班级信息进行修改或者删除 
            (使用Ajax判断是否删除)

4、班级管理板块

(1)班级数据库表(t_clazz)


image.png

注:其中班级标签id是标签表的外键,建表后添加数据时, 一定要保证标签中有数据

--班级表
create table t_clazz(
  c_id int primary key auto_increment,
  c_name varchar(20) not null,
  c_logoPath varchar(50),
  c_mark_id int
)

(2)班级页面图


image.png

(3)班级功能详情

1. 添加班级:班级的id,班级的标签(依赖于标签表),班级名,班级Logo(其中班级的Logo 通过存储路径的形式进行存储 )
2. 删除班级: 删除标签时,需要先删除,学生,和小组里面包含的该班级信息
            (使用Ajax判断是否删除)

5、小组管理模块

(1)小组数据库设计(t_group)


image.png

注意:其中班级id依赖于班级表,添加小组数据之前我们需要先添加班级的数据


--小组表
create table t_group(
  g_id int primary key auto_increment,
  g_name varchar(20) not null,
  g_createdate date,
  g_clazz_id int
)

(2)小组功能示意图


image.png

(3)小组功能详情

1. 添加小组功能:会添加组名称,然后选择班级(小组是班级的外键,需要先建班级表才能创建小组表 )
          (其中包含student外键:添加组名称时:本组学生的标签会自动增加到小组标签上,并且统计本组学生人数 )
2. 删除小组功能: 删除小组之前需要将本小组的studnet删除或者修改带其他组,否则无法删除
                (使用Ajax判断是否删除)
3.页面展示功能中的学生标签和学生人数,将从外键Student中获取,班级名称名班级表中获取

6、学生管理板块

(1)学生表数据库设计(t_student)


image.png

注意:学生表一定要 最后建 ,学生表依赖于 城市表,班级表,标签表,小组表 ,并且需要这四个表有数据之后,我们才能添加数据


学生标签关系表 t_sm_relation( 因为学生和标签为多对多关系,产生中间表 )


image.png

t_studnet学生表

-- 学生表
create table t_student(
  -- 学生 id 主键 自增
  id int primary key auto_increment,
  -- 学生姓名
  name varchar(20) not null,
  --电话
  phone varchar(20),
   --QQ
  qq varchar(20),
   --年龄
  age int,
  -- 生日
  s_birthday date,
   --星座
  s_starts varchar(20),
   --生肖
  s_attr varchar(20),
   --班级id
  s_clazz_id int,
   --小组id
  s_group_id int,
   --城市id
  s_city_id int,
   --学生标签关系表id 
  r_id  int
)
--t_sm_relation 学生标签关系表
create table t_sm_relation(
r_id int primary key auto_increment,
m_id int not null,
s_id int not null
)

(2)学生管理操作图


image.png

(3)学生信息功能详情

1. 添加学生信息(**城市表,班级表,标签表,小组表有数据之后才能添加** )
2. 功能是修改学生,删除学生
3. 展示内容(分页实现)
4. 以Json形式下载信息
5. 以QQ或者姓名或者手机号查询学生信息

六、数据库表

1、教务管理系统数据库表

/*==============================================================*/
/* DBMS name:      MySQL 5.0                                    */
/* Created on:     2021/10/31 11:47:31                          */
/*==============================================================*/
drop table if exists m_s_fk;
drop table if exists t_city;
drop table if exists t_group;
drop table if exists t_mark;
drop table if exists t_studnet;
drop table if exists user;
/*==============================================================*/
/* Table: m_s_fk                                                */
/*==============================================================*/
create table m_s_fk
(
   m_id                 int not null auto_increment,
   s_id                 int not null,
   primary key (m_id, s_id)
);
alter table m_s_fk comment '一个标签可以被多个学生选择,一个学生可以选择多个标签';
/*==============================================================*/
/* Table: t_city                                                */
/*==============================================================*/
create table t_city
(
   c_id                 int not null auto_increment,
   c_name               varchar(20) not null,
   primary key (c_id)
);
alter table t_city comment '用于存储城市信息的实体';
/*==============================================================*/
/* Table: t_group                                               */
/*==============================================================*/
create table t_group
(
   g_id                 int not null auto_increment,
   clazz_id             int,
   g_name               varchar(20) not null,
   g_createdate         date not null,
   primary key (g_id)
);
alter table t_group comment '用于存储小组信息的实体';
/*==============================================================*/
/* Table: t_mark                                                */
/*==============================================================*/
create table t_mark
(
   m_id                 int not null auto_increment,
   m_name               varchar(20) not null,
   m_time               date not null,
   m_type               varchar(20) not null,
   primary key (m_id)
);
alter table t_mark comment '用于存储标签的实体';
/*==============================================================*/
/* Table: t_clazz                                               */
/*==============================================================*/
create table t_clazz
(
   clazz_id             int not null auto_increment,
    m_id                 int not null,
   c_name               varchar(20) not null,
   c_logo_path          varchar(300) not null,
   primary key (clazz_id)
);
alter table t_clazz comment '用于存储班级信息的实体';
/*==============================================================*/
/* Table: t_studnet                                             */
/*==============================================================*/
create table t_studnet
(
   s_id                 int not null auto_increment,
   clazz_id             int , 
   g_id                 int ,
   c_id                 int ,
   s_phone              varchar(20) not null,
   s_name               varchar(20) not null,
   s_qq                 varchar(20) not null,
   s_age                varchar(20) not null,
   s_birthday           date not null,
   s_starts             varchar(20) not null,
   s_attr               varchar(20) not null,
   primary key (s_id)
);
alter table t_studnet comment '用于存储学生信息的实体';
/*==============================================================*/
/* Table: user                                                  */
/*==============================================================*/
create table user
(
   id                   int not null auto_increment,
   username             varchar(20) not null,
   password             varchar(20) not null,
   role                 int,
   code                 varchar(100),
   email                varchar(50) not null,
   status               int,
   primary key (id)
);
alter table user comment '用于用户登录注册';
alter table m_s_fk add constraint FK_m_s_fk foreign key (m_id)
      references t_mark (m_id) on delete restrict on update restrict;
alter table m_s_fk add constraint FK_m_s_fk2 foreign key (s_id)
      references t_studnet (s_id) on delete restrict on update restrict;
alter table t_group add constraint FK_g_c_fk foreign key (clazz_id)
      references t_clazz (clazz_id) on delete restrict on update restrict;
alter table t_clazz add constraint FK_m_c_fk foreign key (m_id)
      references  t_mark(m_id) on delete restrict on update restrict;
alter table t_studnet add constraint FK_c_s_fk foreign key (c_id)
      references t_city (c_id) on delete restrict on update restrict;
alter table t_studnet add constraint FK_s_c_fk foreign key (clazz_id)
      references t_clazz (clazz_id) on delete restrict on update restrict;
alter table t_studnet add constraint FK_s_m_fk foreign key (g_id)
      references t_group (g_id) on delete restrict on update restrict;

2、导入数据库表的步骤:

(1)打开命令窗口输入: mysql -uroot -proot



image.png

(2)创建数据库表


展示数据库中目前拥有的数据库表:show databases;


创建数据库表:create database status_sys


image.png


(3)先退出数据库:exit,



image.png

(4)导入“status_sys”文件:


先将“status_sys”文件放入E盘下,方便导入:


命令:mysql -uroot -proot status_sys<e:\status_sys.sql



image.png

(5)效果展示图


image.png

相关文章
|
1天前
|
缓存 监控 NoSQL
使用Java实现分布式缓存系统
使用Java实现分布式缓存系统
|
1天前
|
设计模式 消息中间件 监控
如何在Java项目中实现可扩展性架构
如何在Java项目中实现可扩展性架构
|
1天前
|
存储 数据采集 搜索推荐
使用Java实现智能推荐系统的关键技术
使用Java实现智能推荐系统的关键技术
|
1天前
|
设计模式 Java 开发者
如何在Java项目中实现领域驱动设计(DDD)
如何在Java项目中实现领域驱动设计(DDD)
|
1天前
|
消息中间件 Java 中间件
如何在Java项目中实现分布式事务管理
如何在Java项目中实现分布式事务管理
|
1天前
|
存储 缓存 NoSQL
使用Java构建高性能的分布式缓存系统
使用Java构建高性能的分布式缓存系统
|
1天前
|
消息中间件 Java 中间件
如何在Java项目中实现高效的消息队列系统
如何在Java项目中实现高效的消息队列系统
|
1天前
|
消息中间件 安全 Java
使用Java实现智能物流管理系统的关键技术
使用Java实现智能物流管理系统的关键技术
|
1天前
|
消息中间件 监控 Java
使用Java实现高性能消息队列系统
使用Java实现高性能消息队列系统
|
1天前
|
Java jenkins 持续交付
Jenkins是开源CI/CD工具,用于自动化Java项目构建、测试和部署。通过配置源码管理、构建触发器、执行Maven目标,实现代码提交即触发构建和测试
【7月更文挑战第1天】Jenkins是开源CI/CD工具,用于自动化Java项目构建、测试和部署。通过配置源码管理、构建触发器、执行Maven目标,实现代码提交即触发构建和测试。成功后,Jenkins执行部署任务,发布到服务器或云环境。使用Jenkins能提升效率,保证软件质量,加速上线,并需维护其稳定运行。
11 0