基于WEB的图书馆作业管理

基于WEB的图书馆作业管理登录注册界面

基于WEB的图书馆作业管理mysql数据库版本源码:

超级管理员表创建语句如下:


create table t_admin(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '超级管理员账号',
	password varchar(100) comment '超级管理员密码'
) comment '超级管理员';
insert into t_admin(username,password) values('admin','123456');

图书表创建语句如下:


create table t_book(
	id int primary key auto_increment comment '主键',
	typesId int comment '分类',
	bookname varchar(100) comment '书名',
	bookpic varchar(100) comment '图片',
	writename varchar(100) comment '作者',
	company varchar(100) comment '出版社',
	pubdate varchar(100) comment '出版日期',
	buydate varchar(100) comment '入库日期'
) comment '图书';

借书信息表创建语句如下:


create table t_bookborrow(
	id int primary key auto_increment comment '主键',
	userId int comment '用户',
	bookId int comment '图书',
	borrowdate datetime comment '借书日期',
	returndate datetime comment '归还日期',
	status varchar(100) comment '状态'
) comment '借书信息';

分类表创建语句如下:


create table t_types(
	id int primary key auto_increment comment '主键',
	typesName varchar(100) comment '分类'
) comment '分类';

用户表创建语句如下:


create table t_user(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '账号',
	password varchar(100) comment '密码',
	name varchar(100) comment '姓名',
	num varchar(100) comment '电话',
	createdate datetime comment '创建日期',
	sex varchar(100) comment '性别',
	booknum int comment '借书数量'
) comment '用户';

基于WEB的图书馆作业管理oracle数据库版本源码:

超级管理员表创建语句如下:


create table t_admin(
	id integer,
	username varchar(100),
	password varchar(100)
);
insert into t_admin(id,username,password) values(1,'admin','123456');
--超级管理员字段加注释
comment on column t_admin.id is '主键';
comment on column t_admin.username is '超级管理员账号';
comment on column t_admin.password is '超级管理员密码';
--超级管理员表加注释
comment on table t_admin is '超级管理员';

图书表创建语句如下:


create table t_book(
	id integer,
	typesId int,
	bookname varchar(100),
	bookpic varchar(100),
	writename varchar(100),
	company varchar(100),
	pubdate varchar(100),
	buydate varchar(100)
);
--图书字段加注释
comment on column t_book.id is '主键';
comment on column t_book.typesId is '分类';
comment on column t_book.bookname is '书名';
comment on column t_book.bookpic is '图片';
comment on column t_book.writename is '作者';
comment on column t_book.company is '出版社';
comment on column t_book.pubdate is '出版日期';
comment on column t_book.buydate is '入库日期';
--图书表加注释
comment on table t_book is '图书';

借书信息表创建语句如下:


create table t_bookborrow(
	id integer,
	userId int,
	bookId int,
	borrowdate datetime,
	returndate datetime,
	status varchar(100)
);
--借书信息字段加注释
comment on column t_bookborrow.id is '主键';
comment on column t_bookborrow.userId is '用户';
comment on column t_bookborrow.bookId is '图书';
comment on column t_bookborrow.borrowdate is '借书日期';
comment on column t_bookborrow.returndate is '归还日期';
comment on column t_bookborrow.status is '状态';
--借书信息表加注释
comment on table t_bookborrow is '借书信息';

分类表创建语句如下:


create table t_types(
	id integer,
	typesName varchar(100)
);
--分类字段加注释
comment on column t_types.id is '主键';
comment on column t_types.typesName is '分类';
--分类表加注释
comment on table t_types is '分类';

用户表创建语句如下:


create table t_user(
	id integer,
	username varchar(100),
	password varchar(100),
	name varchar(100),
	num varchar(100),
	createdate datetime,
	sex varchar(100),
	booknum int
);
--用户字段加注释
comment on column t_user.id is '主键';
comment on column t_user.username is '账号';
comment on column t_user.password is '密码';
comment on column t_user.name is '姓名';
comment on column t_user.num is '电话';
comment on column t_user.createdate is '创建日期';
comment on column t_user.sex is '性别';
comment on column t_user.booknum is '借书数量';
--用户表加注释
comment on table t_user is '用户';

oracle特有,对应序列如下:


create sequence s_t_book;
create sequence s_t_bookborrow;
create sequence s_t_types;
create sequence s_t_user;

基于WEB的图书馆作业管理sqlserver数据库版本源码:

超级管理员表创建语句如下:


--超级管理员
create table t_admin(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--超级管理员账号
	password varchar(100)--超级管理员密码
);
insert into t_admin(username,password) values('admin','123456');

图书表创建语句如下:


--图书表注释
create table t_book(
	id int identity(1,1) primary key not null,--主键
	typesId int,--分类
	bookname varchar(100),--书名
	bookpic varchar(100),--图片
	writename varchar(100),--作者
	company varchar(100),--出版社
	pubdate varchar(100),--出版日期
	buydate varchar(100)--入库日期
);

借书信息表创建语句如下:


--借书信息表注释
create table t_bookborrow(
	id int identity(1,1) primary key not null,--主键
	userId int,--用户
	bookId int,--图书
	borrowdate datetime,--借书日期
	returndate datetime,--归还日期
	status varchar(100)--状态
);

分类表创建语句如下:


--分类表注释
create table t_types(
	id int identity(1,1) primary key not null,--主键
	typesName varchar(100)--分类
);

用户表创建语句如下:


--用户表注释
create table t_user(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--账号
	password varchar(100),--密码
	name varchar(100),--姓名
	num varchar(100),--电话
	createdate datetime,--创建日期
	sex varchar(100),--性别
	booknum int--借书数量
);

基于WEB的图书馆作业管理登录后主页

基于WEB的图书馆作业管理spring+springMVC+hibernate框架对象(javaBean,pojo)设计:

图书javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//图书
@Table(name = "t_book")
public class Book {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//分类
private Integer typesId;
//书名
private String bookname;
//图片
private String bookpic;
//作者
private String writename;
//出版社
private String company;
//出版日期
private String pubdate;
//入库日期
private String buydate;
public Integer getTypesId() {return typesId;}
public void setTypesId(Integer typesId) {this.typesId = typesId;}
public String getBookname() {return bookname;}
public void setBookname(String bookname) {this.bookname = bookname;}
public String getBookpic() {return bookpic;}
public void setBookpic(String bookpic) {this.bookpic = bookpic;}
public String getWritename() {return writename;}
public void setWritename(String writename) {this.writename = writename;}
public String getCompany() {return company;}
public void setCompany(String company) {this.company = company;}
public String getPubdate() {return pubdate;}
public void setPubdate(String pubdate) {this.pubdate = pubdate;}
public String getBuydate() {return buydate;}
public void setBuydate(String buydate) {this.buydate = buydate;}
}

借书信息javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//借书信息
@Table(name = "t_bookborrow")
public class Bookborrow {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//用户
private Integer userId;
//图书
private Integer bookId;
//借书日期
private Date borrowdate;
//归还日期
private Date returndate;
//状态
private String status;
public Integer getUserId() {return userId;}
public void setUserId(Integer userId) {this.userId = userId;}
public Integer getBookId() {return bookId;}
public void setBookId(Integer bookId) {this.bookId = bookId;}
public Date getBorrowdate() {return borrowdate;}
public void setBorrowdate(Date borrowdate) {this.borrowdate = borrowdate;}
public Date getReturndate() {return returndate;}
public void setReturndate(Date returndate) {this.returndate = returndate;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
}

分类javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//分类
@Table(name = "t_types")
public class Types {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//分类
private String typesName;
public String getTypesName() {return typesName;}
public void setTypesName(String typesName) {this.typesName = typesName;}
}

用户javaBean创建语句如下:


package project.model;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import java.util.Date;
@Entity

//用户
@Table(name = "t_user")
public class User {
//主键
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//账号
private String username;
//密码
private String password;
//姓名
private String name;
//电话
private String num;
//创建日期
private Date createdate;
//性别
private String sex;
//借书数量
private Integer booknum;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getName() {return name;}
public void setName(String name) {this.name = name;}
public String getNum() {return num;}
public void setNum(String num) {this.num = num;}
public Date getCreatedate() {return createdate;}
public void setCreatedate(Date createdate) {this.createdate = createdate;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public Integer getBooknum() {return booknum;}
public void setBooknum(Integer booknum) {this.booknum = booknum;}
}

基于WEB的图书馆作业管理spring+springMVC+mybatis框架对象(javaBean,pojo)设计:

图书javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//图书
public class Book  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//分类
private Integer typesId;
//书名
private String bookname;
//图片
private String bookpic;
//作者
private String writename;
//出版社
private String company;
//出版日期
private String pubdate;
//入库日期
private String buydate;
public Integer getTypesId() {return typesId;}
public void setTypesId(Integer typesId) {this.typesId = typesId;}
public String getBookname() {return bookname;}
public void setBookname(String bookname) {this.bookname = bookname;}
public String getBookpic() {return bookpic;}
public void setBookpic(String bookpic) {this.bookpic = bookpic;}
public String getWritename() {return writename;}
public void setWritename(String writename) {this.writename = writename;}
public String getCompany() {return company;}
public void setCompany(String company) {this.company = company;}
public String getPubdate() {return pubdate;}
public void setPubdate(String pubdate) {this.pubdate = pubdate;}
public String getBuydate() {return buydate;}
public void setBuydate(String buydate) {this.buydate = buydate;}
}

借书信息javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//借书信息
public class Bookborrow  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//用户
private Integer userId;
//图书
private Integer bookId;
//借书日期
private Date borrowdate;
//归还日期
private Date returndate;
//状态
private String status;
public Integer getUserId() {return userId;}
public void setUserId(Integer userId) {this.userId = userId;}
public Integer getBookId() {return bookId;}
public void setBookId(Integer bookId) {this.bookId = bookId;}
public Date getBorrowdate() {return borrowdate;}
public void setBorrowdate(Date borrowdate) {this.borrowdate = borrowdate;}
public Date getReturndate() {return returndate;}
public void setReturndate(Date returndate) {this.returndate = returndate;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
}

分类javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//分类
public class Types  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//分类
private String typesName;
public String getTypesName() {return typesName;}
public void setTypesName(String typesName) {this.typesName = typesName;}
}

用户javaBean创建语句如下:


package project.model;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;

//用户
public class User  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//账号
private String username;
//密码
private String password;
//姓名
private String name;
//电话
private String num;
//创建日期
private Date createdate;
//性别
private String sex;
//借书数量
private Integer booknum;
public String getUsername() {return username;}
public void setUsername(String username) {this.username = username;}
public String getPassword() {return password;}
public void setPassword(String password) {this.password = password;}
public String getName() {return name;}
public void setName(String name) {this.name = name;}
public String getNum() {return num;}
public void setNum(String num) {this.num = num;}
public Date getCreatedate() {return createdate;}
public void setCreatedate(Date createdate) {this.createdate = createdate;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public Integer getBooknum() {return booknum;}
public void setBooknum(Integer booknum) {this.booknum = booknum;}
}

源代码下载点这里

评论