Requirements specification for project initiation of Java classic basic project student educational administration system
1, Demand background
The system design of student educational administration system takes convenience, quickness and safety as the starting point, abandons the defects and deficiencies of traditional manual records on student information management, and adopts a new way to enable the school to store and maintain student information and increase management efficiency.
This system is generally an educational administration student management system, and gives administrators many functions to operate this system, including: student management, group management, class management and so on; Through the design of these functional modules, the functions required by teachers to control students' information are met. System adoption b/s(browser/The server) Three-tier structure, the production of dynamic pages adopts JSP+Ajax Technology, in order to realize the safety and reliability of the management system and consider that some codes can be reused, it is adopted when encapsulating the important codes of the program Java Bean. The system implements the people-oriented idea and has high practicability.
2, Product objectives
The management of student information has become more and more huge and cumbersome, and the efficiency is also low. In order to make full use of the convenience brought by the Internet, better improve the efficiency of teaching management, and make it more convenient for students and teaching staff to carry out information query activities, this teaching management system is specially developed. The software logs in to the system through authority identification, and the functions enjoyed by different authorities are different, so as to realize the daily management of student information.
3, Project introduction of student educational administration system:
1. Development environment
classification | name | languages |
---|---|---|
operating system | windows10 | Simplified Chinese |
Database platform | MySQL Server 8.0+ | |
application server | apache-tomcat-8.5.71 | |
java development tools | idea | |
frame | mybatis/Struts2 | |
entry name | Student educational administration system | |
implementation technique | Struts 2 + mybatis + MySQL + servlet + jQuery + Ajax + JS + Maven and other technologies |
2. The overall function of Baizhi educational administration system
Serial number | Module name | major function |
---|---|---|
1 | Student management module | Add student information, delete student information, modify student information, query student information, download new student information, and display student information in pages |
2 | Group management module | Add group information, delete group information and display group specific information |
3 | Class management module | Add class information, delete class information and display class information |
4 | Label management module | Add tags, delete tags, display tags |
5 | Urban management module | Add city, delete City |
6 | Login registration module | Login and registration (permission identification) |
(3) User role description
Role name | Role description | Frequency of use |
---|---|---|
user | It is mainly the monitor and head teacher of each class (only students can be viewed, and there is no permission to operate other functions) | in |
administrators | As a system administrator | high |
4, Specific needs
1. Functional division
The overall function of the system is B/S Structural Windows Application!
2. Overall functional framework of the project
3. Conceptual data model CMD
CMD is a model of the relationship between entities (designed using PdShell)
1. The number of tables is related to the module Table 6 2. Confirmation field User table: id User name password role City Table: id Address name Label sheet: id Tag name, tag creation time, tag type Class table: id Class name, class Logo(Picture path) Group table: id Group name, creation time Student form: id Name, birthday, QQ,Telephone, constellation, Zodiac 3. Confirm relationship relationship: student-Class: Many to one foreign key columns are added to the student table clazz_id student-Group: Many to one foreign key columns are added to the student table gropu_id student-Employment City: Many to one foreign key columns are added to the student table city_id student-label: Many to many intermediate table (relational table) class-label: Many to one foreign key columns are added to the class table clazz_id class-group: One to many foreign key columns are added to the group table group_id
5, Functional requirements
1. User login / registration section
(1) User / administrator table design (t_user)
field | type | Primary key | constraint | remarks |
---|---|---|---|---|
id | int | yes | Self increasing | ID |
username | Varchar(40) | not null unique | The user name (unique) is implemented using Ajax | |
password | Varchar(40) | not null | Password, encrypted with Md5 | |
role | int | not null | Role: 0 administrator 1 user | |
code | Varchar(100) | Activation code | ||
Varchar(50) | not null | Mailbox, non repeatable | ||
status | int | Activation status: 0 inactive, 1 active, 2 invalid |
Note: after registering, the mailbox user sends an email to the registered user. After activation, you can log in with this account, otherwise the registration will be invalid
--User table create table t_user( id int primary key auto_increment, -- Where the user name passes Ajax Judge whether the registered query user name is repeated username varchar(40) not null unique, password varchar(40) not null, --'User 0 administrator 1', role int not null, --User's mailbox! For activation use! email varchar(50) not null, --'Mail activation code', code Varchar(100), -- 'User's activation status 0 is not activated 1 is activated', status int )
(2) Implementation of login function
1. Before the user logs in, the user name must be activated through the mailbox during registration, otherwise he cannot log in, and a prompt message is returned: the user name is entered incorrectly~~ 2. If the user name is entered incorrectly, a prompt message will be returned: the user name is entered incorrectly~~ 3. If the verification code is entered incorrectly Return prompt: verification code input error~~~ 4. If the user name and verification code are correct, a prompt message will be returned: the password is entered incorrectly~~
(3) Implementation of registration function
1.Due to the prototype model, the "mailbox field" is not designed, which is specially added to the user. In the specific development, the mailbox is placed under the user 2. After the registration is submitted, it will jump to the please go to the email to activate the user page 3.After successful activation, you will jump to login Note: when entering a user, it will pass Ajax Whether the user has authentication, If the user name exists, you will be reminded:"User already exists, please re-enter"
(4) Function flow chart of user section
1. Register on the registration page 2. Jump to request activation page 3. Mailbox page request activation 4. After activation, jump to the activated page 5. After activation, jump to the login page
2. Urban management sector
(1) Urban management database (t_city)
field | type | Primary key | constraint | remarks |
---|---|---|---|---|
c_id | int | yes | Self increasing | number |
c_name | varchar(20) | not null unique | name |
Note: there is t in Studnet table_ City, so we'd better put the city table in the first table when we build the table
create table t_city( id int primary key auto_increment , name varchar(20) not null unique )
(2) Urban function diagram
(3) City function details
1. Add city: you only need to add the city name and use Ajax Determine the unique city 2. Delete City: delete"city"Before the field, we must delete the students selected for employment in the current city, Or ask the student to modify the employment city(use Ajax Determine whether to delete)
3. Label management section
(1) Label management database design (t_mark)
field | type | Primary key | constraint | Serial number |
---|---|---|---|---|
m_id | int | yes | Self increasing | number |
m_name | Varchar(20) | Non empty | name | |
m_time | date | Non empty | Creation time | |
m_type | Varchar(20) | Non empty | Label type |
Note: there are labels in the student table and class table. We'd better build the student table before the student table and class table
--Label table 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) Schematic diagram of label function
(3) Tag function details
1. Add label: add label. Pay attention to add label name and label type (label type includes: student)/Class (two types) 2. Delete tag: before deleting the tag name field, we have to modify or delete the class and class information of relevant tags selected in the corresponding student table and class table (use Ajax Determine whether to delete)
4. Class management section
(1) Class database table (t_clazz)
field | type | Primary key | constraint | Serial number |
---|---|---|---|---|
c_id | int | yes | Self increasing | Class ID |
c_name | Varchar(20) | Class name | ||
c_logoPath | Varchar(300) | Class LOGO | ||
c_mark_id | Varchar(20) | Foreign key | Tag serial number |
Note: class tag id is the foreign key of the tag table. When adding data after creating the table, make sure there is data in the tag
--Class table 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) Class page map
(3) Class function details
1. Add class: of the class id,Class label (depending on the label table), class name, class Logo(Of which class Logo (stored in the form of storage path) 2. Delete class: When deleting a tag, you need to delete the class information contained in, students, and groups (use Ajax Determine whether to delete)
5. Group management module
(1) Group database design (t_group)
field | type | Primary key | constraint | Serial number |
---|---|---|---|---|
g_id | int | yes | Self increasing | Group number |
g_name | Varchar(20) | Non empty | Group name | |
g_createdate | date | Group creation time | ||
g_clazz_id | int | Class id |
Note: class id depends on class table. We need to add class data before adding group data
--Group table 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) Group function diagram
(3) Group function details
1. Add group function: the group name will be added, and then the class will be selected (the group is the foreign key of the class, and the class table needs to be created before the group table can be created) (Which contains student Foreign key: when adding group name: the label of students in this group will be automatically added to the group label, and the number of students in this group will be counted) 2. Delete group function: before deleting a group, you need to delete the group's studnet Delete or modify other groups, otherwise it cannot be deleted (use Ajax Determine whether to delete) 3.The student tag and number of students in the page display function will be displayed from the foreign key Student The class name is obtained from the class table
6. Student management section
(1) Student table database design (t_student)
field | type | Primary key | constraint | remarks |
---|---|---|---|---|
s_id | int | yes | Self increasing | Student number |
s_name | Varchar(20) | Non empty | full name | |
s_phone | Varchar(20) | Non empty | Telephone | |
s_qq | Varchar(20) | Non empty | ||
s_age | int | Non empty | Age | |
s_birthday | date | Non empty | birthday | |
s_starts | Varchar(20) | Constellation, which can be blank. If it is not filled in, it is blank by default | ||
s_attr | Varchar(20) | Zodiac, which can be blank. If it is not filled in, it is blank by default | ||
s_clazz_id | int | Non empty, foreign key | Class id (foreign key), associated class table | |
s_group_id | int | Non empty, foreign key | Group id (foreign key), associated group table | |
s_city_id | int | Non empty, foreign key | Employment City id (foreign key), associated city table |
Note: the student table must be built finally. The student table depends on the city table, class table, label table and group table, and we can add data only after these four tables have data
- Student label relationship table t_ sm_ Relationship (because the student and label are many to many, an intermediate table is generated)
field | type | Primary key | constraint | remarks |
---|---|---|---|---|
r_id | int | yes | Self increasing | Relationship id |
s_id | int | Foreign key, non empty | Student id | |
mark_id | int | Foreign key, non empty | Tag id |
- t_studnet student form
-- Student list create table t_student( -- student id Primary key auto increment id int primary key auto_increment, -- Student name name varchar(20) not null, --Telephone phone varchar(20), --QQ qq varchar(20), --Age age int, -- birthday s_birthday date, --constellation s_starts varchar(20), --the Chinese zodiac s_attr varchar(20), --class id s_clazz_id int, --group id s_group_id int, --city id s_city_id int, --Student label relationship table id r_id int ) --t_sm_relation Student label relationship table create table t_sm_relation( r_id int primary key auto_increment, m_id int not null, s_id int not null )
(2) Student management operation diagram
(3) Student information function details
1. Add student information(**City table, class table, label table and group table can only be added after data is available** ) 2. The function is to modify students and delete students 3. Display content (paging Implementation) 4. with Json Form download information 5. with QQ Or name or mobile phone number to query student information
6, Database table
1. Database table of educational administration management system
/*==============================================================*/ /* 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 'A tag can be selected by multiple students, and a student can select multiple tags'; /*==============================================================*/ /* 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 'An entity used to store city information'; /*==============================================================*/ /* 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 'Entity used to store group information'; /*==============================================================*/ /* 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 'Entity used to store labels'; /*==============================================================*/ /* 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 'An entity used to store class information'; /*==============================================================*/ /* 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 'An entity used to store student information'; /*==============================================================*/ /* 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 'For user login registration'; 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. To import a database table:
(1) Open the command window and enter: mysql -uroot -proot
(2) Create database tables
-
Display the database tables currently in the database: show databases;
-
Create database table: create database status_sys
(3) Exit the database first: exit,
(4) To import the "status_sys" file:
First put the "status_sys" file into disk E for easy import:
Command: MySQL - uroot - proot status_sys < e: \ status_sys.sql
(5) Effect display diagram