图书借阅系统

图书借阅系统登录注册界面

图书借阅系统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 '主键',
	bookName varchar(100) comment '书名',
	zz varchar(100) comment '作者',
	content varchar(100) comment '目录',
	pic varchar(100) comment '图片',
	fileUrl varchar(100) comment '电子书籍(如果有,可以供用户直接下载)',
	status varchar(100) comment '状态',
	v1 int comment '书籍所剩库存',
	v2 int comment '总库存'
) comment '书籍';

惩罚记录表创建语句如下:


create table t_cf(
	id int primary key auto_increment comment '主键',
	bookId int comment '书籍',
	customerId int comment '用户',
	types varchar(100) comment '类别',
	ms varchar(100) comment '描述',
	content varchar(100) comment '内容'
) comment '惩罚记录';

普通用户表创建语句如下:


create table t_customer(
	id int primary key auto_increment comment '主键',
	username varchar(100) comment '账号',
	password varchar(100) comment '密码',
	customerName varchar(100) comment '姓名',
	age varchar(100) comment '年龄',
	sex varchar(100) comment '性别',
	phone varchar(100) comment '电话',
	idcard varchar(100) comment '身份证',
	address varchar(100) comment '住址',
	pic varchar(100) comment '图片'
) comment '普通用户';

借书记录表创建语句如下:


create table t_order(
	id int primary key auto_increment comment '主键',
	bookId int comment '书籍',
	customerId int comment '用户',
	insertDate datetime comment '借阅日期',
	status varchar(100) comment '状态',
	backDate datetime comment '归还日期'
) comment '借书记录';

图书借阅系统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,
	bookName varchar(100),
	zz varchar(100),
	content varchar(100),
	pic varchar(100),
	fileUrl varchar(100),
	status varchar(100),
	v1 int,
	v2 int
);
--书籍字段加注释
comment on column t_book.id is '主键';
comment on column t_book.bookName is '书名';
comment on column t_book.zz is '作者';
comment on column t_book.content is '目录';
comment on column t_book.pic is '图片';
comment on column t_book.fileUrl is '电子书籍(如果有,可以供用户直接下载)';
comment on column t_book.status is '状态';
comment on column t_book.v1 is '书籍所剩库存';
comment on column t_book.v2 is '总库存';
--书籍表加注释
comment on table t_book is '书籍';

惩罚记录表创建语句如下:


create table t_cf(
	id integer,
	bookId int,
	customerId int,
	types varchar(100),
	ms varchar(100),
	content varchar(100)
);
--惩罚记录字段加注释
comment on column t_cf.id is '主键';
comment on column t_cf.bookId is '书籍';
comment on column t_cf.customerId is '用户';
comment on column t_cf.types is '类别';
comment on column t_cf.ms is '描述';
comment on column t_cf.content is '内容';
--惩罚记录表加注释
comment on table t_cf is '惩罚记录';

普通用户表创建语句如下:


create table t_customer(
	id integer,
	username varchar(100),
	password varchar(100),
	customerName varchar(100),
	age varchar(100),
	sex varchar(100),
	phone varchar(100),
	idcard varchar(100),
	address varchar(100),
	pic varchar(100)
);
--普通用户字段加注释
comment on column t_customer.id is '主键';
comment on column t_customer.username is '账号';
comment on column t_customer.password is '密码';
comment on column t_customer.customerName is '姓名';
comment on column t_customer.age is '年龄';
comment on column t_customer.sex is '性别';
comment on column t_customer.phone is '电话';
comment on column t_customer.idcard is '身份证';
comment on column t_customer.address is '住址';
comment on column t_customer.pic is '图片';
--普通用户表加注释
comment on table t_customer is '普通用户';

借书记录表创建语句如下:


create table t_order(
	id integer,
	bookId int,
	customerId int,
	insertDate datetime,
	status varchar(100),
	backDate datetime
);
--借书记录字段加注释
comment on column t_order.id is '主键';
comment on column t_order.bookId is '书籍';
comment on column t_order.customerId is '用户';
comment on column t_order.insertDate is '借阅日期';
comment on column t_order.status is '状态';
comment on column t_order.backDate is '归还日期';
--借书记录表加注释
comment on table t_order is '借书记录';

oracle特有,对应序列如下:


create sequence s_t_book;
create sequence s_t_cf;
create sequence s_t_customer;
create sequence s_t_order;

图书借阅系统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,--主键
	bookName varchar(100),--书名
	zz varchar(100),--作者
	content varchar(100),--目录
	pic varchar(100),--图片
	fileUrl varchar(100),--电子书籍(如果有,可以供用户直接下载)
	status varchar(100),--状态
	v1 int,--书籍所剩库存
	v2 int--总库存
);

惩罚记录表创建语句如下:


--惩罚记录表注释
create table t_cf(
	id int identity(1,1) primary key not null,--主键
	bookId int,--书籍
	customerId int,--用户
	types varchar(100),--类别
	ms varchar(100),--描述
	content varchar(100)--内容
);

普通用户表创建语句如下:


--普通用户表注释
create table t_customer(
	id int identity(1,1) primary key not null,--主键
	username varchar(100),--账号
	password varchar(100),--密码
	customerName varchar(100),--姓名
	age varchar(100),--年龄
	sex varchar(100),--性别
	phone varchar(100),--电话
	idcard varchar(100),--身份证
	address varchar(100),--住址
	pic varchar(100)--图片
);

借书记录表创建语句如下:


--借书记录表注释
create table t_order(
	id int identity(1,1) primary key not null,--主键
	bookId int,--书籍
	customerId int,--用户
	insertDate datetime,--借阅日期
	status varchar(100),--状态
	backDate datetime--归还日期
);

图书借阅系统登录后主页

图书借阅系统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 String bookName;
//作者
private String zz;
//目录
private String content;
//图片
private String pic;
//电子书籍(如果有,可以供用户直接下载)
private String fileUrl;
//状态
private String status;
//书籍所剩库存
private Integer v1;
//总库存
private Integer v2;
public String getBookName() {return bookName;}
public void setBookName(String bookName) {this.bookName = bookName;}
public String getZz() {return zz;}
public void setZz(String zz) {this.zz = zz;}
public String getContent() {return content;}
public void setContent(String content) {this.content = content;}
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
public String getFileUrl() {return fileUrl;}
public void setFileUrl(String fileUrl) {this.fileUrl = fileUrl;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
public Integer getV1() {return v1;}
public void setV1(Integer v1) {this.v1 = v1;}
public Integer getV2() {return v2;}
public void setV2(Integer v2) {this.v2 = v2;}
}

惩罚记录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_cf")
public class Cf {
//主键
@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 bookId;
//用户
private Integer customerId;
//类别
private String types;
//描述
private String ms;
//内容
private String content;
public Integer getBookId() {return bookId;}
public void setBookId(Integer bookId) {this.bookId = bookId;}
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public String getTypes() {return types;}
public void setTypes(String types) {this.types = types;}
public String getMs() {return ms;}
public void setMs(String ms) {this.ms = ms;}
public String getContent() {return content;}
public void setContent(String content) {this.content = content;}
}

普通用户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_customer")
public class Customer {
//主键
@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 customerName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//身份证
private String idcard;
//住址
private String address;
//图片
private String pic;
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 getCustomerName() {return customerName;}
public void setCustomerName(String customerName) {this.customerName = customerName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getIdcard() {return idcard;}
public void setIdcard(String idcard) {this.idcard = idcard;}
public String getAddress() {return address;}
public void setAddress(String address) {this.address = address;}
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
}

借书记录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_order")
public class Order {
//主键
@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 bookId;
//用户
private Integer customerId;
//借阅日期
private Date insertDate;
//状态
private String status;
//归还日期
private Date backDate;
public Integer getBookId() {return bookId;}
public void setBookId(Integer bookId) {this.bookId = bookId;}
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public Date getInsertDate() {return insertDate;}
public void setInsertDate(Date insertDate) {this.insertDate = insertDate;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
public Date getBackDate() {return backDate;}
public void setBackDate(Date backDate) {this.backDate = backDate;}
}

图书借阅系统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 String bookName;
//作者
private String zz;
//目录
private String content;
//图片
private String pic;
//电子书籍(如果有,可以供用户直接下载)
private String fileUrl;
//状态
private String status;
//书籍所剩库存
private Integer v1;
//总库存
private Integer v2;
public String getBookName() {return bookName;}
public void setBookName(String bookName) {this.bookName = bookName;}
public String getZz() {return zz;}
public void setZz(String zz) {this.zz = zz;}
public String getContent() {return content;}
public void setContent(String content) {this.content = content;}
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
public String getFileUrl() {return fileUrl;}
public void setFileUrl(String fileUrl) {this.fileUrl = fileUrl;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
public Integer getV1() {return v1;}
public void setV1(Integer v1) {this.v1 = v1;}
public Integer getV2() {return v2;}
public void setV2(Integer v2) {this.v2 = v2;}
}

惩罚记录javaBean创建语句如下:


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

//惩罚记录
public class Cf  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//书籍
private Integer bookId;
//用户
private Integer customerId;
//类别
private String types;
//描述
private String ms;
//内容
private String content;
public Integer getBookId() {return bookId;}
public void setBookId(Integer bookId) {this.bookId = bookId;}
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public String getTypes() {return types;}
public void setTypes(String types) {this.types = types;}
public String getMs() {return ms;}
public void setMs(String ms) {this.ms = ms;}
public String getContent() {return content;}
public void setContent(String content) {this.content = content;}
}

普通用户javaBean创建语句如下:


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

//普通用户
public class Customer  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 customerName;
//年龄
private String age;
//性别
private String sex;
//电话
private String phone;
//身份证
private String idcard;
//住址
private String address;
//图片
private String pic;
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 getCustomerName() {return customerName;}
public void setCustomerName(String customerName) {this.customerName = customerName;}
public String getAge() {return age;}
public void setAge(String age) {this.age = age;}
public String getSex() {return sex;}
public void setSex(String sex) {this.sex = sex;}
public String getPhone() {return phone;}
public void setPhone(String phone) {this.phone = phone;}
public String getIdcard() {return idcard;}
public void setIdcard(String idcard) {this.idcard = idcard;}
public String getAddress() {return address;}
public void setAddress(String address) {this.address = address;}
public String getPic() {return pic;}
public void setPic(String pic) {this.pic = pic;}
}

借书记录javaBean创建语句如下:


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

//借书记录
public class Order  extends BaseBean{
//主键
private Integer id;
public Integer getId() {return id;}
public void setId(Integer id) {this.id = id;}
//书籍
private Integer bookId;
//用户
private Integer customerId;
//借阅日期
private Date insertDate;
//状态
private String status;
//归还日期
private Date backDate;
public Integer getBookId() {return bookId;}
public void setBookId(Integer bookId) {this.bookId = bookId;}
public Integer getCustomerId() {return customerId;}
public void setCustomerId(Integer customerId) {this.customerId = customerId;}
public Date getInsertDate() {return insertDate;}
public void setInsertDate(Date insertDate) {this.insertDate = insertDate;}
public String getStatus() {return status;}
public void setStatus(String status) {this.status = status;}
public Date getBackDate() {return backDate;}
public void setBackDate(Date backDate) {this.backDate = backDate;}
}

源代码下载点这里

评论