Hello everyone, I am the founder of the whole micro-complete set of the team, this team is good at JAVA (SSM, SSH, SPRINGBOOT), PYTHON, PHP, C #, Andrews and many other technologies.
Today we will analyze a class website (class website), the project uses the framework for SSM (MYECLIPSE), the choice of development tools for MYECLIPSE. Class website for a background item.
To complete the system, we first need to analyze the needs of the system. A class website should contain user roles administrator, student. In order to allow the user a smooth landing system to complete the related operations, landing roles you need to set up an account and password for each field.
In order to complete the function of the system you need to set the table for the class of students, student record information. Defines the relationship between the two students table, fields corresponding to the id field mingzi wherein the class from the class of students, student and class corresponding to the class id
. In order to complete the function of the system need to set the table for the students recalled, memories recorded information. id field corresponds to define a corresponding relationship between the two tables in the memories, which memories students and student mingzi field memories students and student id
。
The summary results of all system data: administrator (admin), students (xuesheng), class (banji), memories (huiyi)
Administrators table
Field name | Types of | Attributes | description |
id | int(11) | PRIMARY KEY | Administrator id |
username | varchar(255) | account number | |
password | varchar(255) | password |
Student Table
Field name | Types of | Attributes | description |
id | int(11) | PRIMARY KEY | Student id |
mingzi | varchar(255) | first name | |
username | varchar(255) | account number | |
password | varchar(255) | password | |
lianxifangshi | varchar(255) | Contact information | |
spa | varchar(255) | class | |
nianji | varchar(255) | grade | |
banjiid | varchar(255) | Class id |
Class Table
Field name | Types of | Attributes | description |
id | int(11) | PRIMARY KEY | Class id |
mingzi | varchar(255) | first name | |
banzhang | varchar(255) | Squad | |
banzhangid | varchar(255) | Id squad |
Memories table
Field name | Types of | Attributes | description |
id | int(11) | PRIMARY KEY | Recalls id |
biaoti | varchar(255) | title | |
neirong | varchar(255) | content | |
xuesheng | varchar(255) | student | |
xueshengid | varchar(255) | Student id | |
shijian | varchar(255) | time |
Construction of the table statement
SET FOREIGN_KEY_CHECKS=0; -- ---------------------------- -- ---------------------------- -- Table structure for ggbanjiwangzhan -- ---------------------------- DROP TABLE IF EXISTS `t_admin`; CREATE TABLE `t_admin` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '管理员id',`username` varchar(255) DEFAULT NULL COMMENT '账号',`password` varchar(255) DEFAULT NULL COMMENT '密码',PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='管理员'; -- ---------------------------- DROP TABLE IF EXISTS `t_xuesheng`; CREATE TABLE `t_xuesheng` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '学生id' , `Mingzi` VARCHAR ( 255 ) the DEFAULT NULL the COMMENT ' name ' ,` username` VARCHAR ( 255 ) the DEFAULT NULL the COMMENT ' account ' , `password` VARCHAR ( 255 ) the DEFAULT NULL the COMMENT ' password ' ,` lianxifangshi` VARCHAR ( 255 ) the DEFAULT NULL the COMMENT ' Information ' , `banji` VARCHAR ( 255) The DEFAULT NULL the COMMENT ' classes ' , `nianji` VARCHAR ( 255 ) the DEFAULT NULL the COMMENT ' grades ' ,` banjiid` int ( . 11 ) the DEFAULT NULL the COMMENT ' class ID ' , a PRIMARY KEY ( `id`) ) ENGINE = MyISAM the DEFAULT the CHARSET = utf8 the COMMENT = ' students ' ; - ---------------------------- DROP TABLE IF EXISTS `t_banji`; CREATE TABLE `t_banji` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '班级id',`mingzi` varchar(255) DEFAULT NULL COMMENT '名字',`banzhang` varchar(255) DEFAULT NULL COMMENT '班长',`banzhangid` int(11) DEFAULT NULL COMMENT '班长id',PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='班级'; -- ---------------------------- DROP TABLE IF EXISTS `t_huiyi`; CREATE TABLE `t_huiyi` (`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '回忆id',`biaoti` varchar(255) DEFAULT NULL COMMENT ' Title ' , `neirong` VARCHAR ( 255 ) the DEFAULT NULL the COMMENT ' content ' ,` xuesheng` VARCHAR ( 255 ) the DEFAULT NULL the COMMENT ' student ' , `xueshengid` int ( 11 ) the DEFAULT NULL the COMMENT ' students the above mentioned id ' ,` shijian` VARCHAR ( 255 ) the DEFAULT NULL the COMMENT ' time ' , a PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='回忆';