|
系统需求分析
系统功能结构模块
- 系统设置:图书馆信息,用户设置,参数设置,书架设置
- 图书借还:图书借阅,图书续借,图书归还
- 系统查询:图书档案查询,图书借阅查询,节约到期查询
功能需求
- 系统管理:定义读者类别并设置参数,添加、修改和删除读者信息。
- 图书续借和预约:实现图书的续借、预约等功能。
- 图书检索:按书名或作者等信息进行检索。
- 借阅查询:查询个人借阅情况、未付罚款情况。
其他要求:读者未登录时,只能检索图书,登录后才能使用预约、续借和取消预约图书, 查询个人借阅史以及修改密码功能
概念结构设计
bookcase:
Name | Code | Data Type | Length | Precision | Primary | Foreign Key | Mandatory | id | 书号 | char(10) | 10 | TRUE | FALSE | TRUE | name | 书名 | char(10) | 10 | FALSE | FALSE | TRUE | bookinfo:
Name | Code | Data Type | Length | Precision | Primary | Foreign Key | Mandatory | Barcode | 条形码 | char(10) | 10 | TRUE | FALSE | TRUE | bookname | 书名 | char(10) | 10 | FALSE | FALSE | TRUE | typeid | 图书类型 | char(20) | 20 | FALSE | FALSE | FALSE | author | 作者 | FLOAT | FALSE | FALSE | TRUE | Page | 页数 | FLOAT | FALSE | FALSE | TRUE | bookcase | 书架 | char(Max) | Max | FALSE | FALSE | FALSE | press | 出版社 | char(20) | 20 | FALSE | FALSE | FALSE | borrow:
Name | Code | Data Type | Length | Precision | Primary | Foreign Key | Mandatory | id | 登陆账号 | char(10) | 10 | TRUE | FALSE | TRUE | readerid | 读者证 | char(10) | 10 | TRUE | FALSE | TRUE | bookid | 条形码 | char(20) | 20 | TRUE | FALSE | FALSE | borrowtime | 借书时间 | char(10) | 10 | FALSE | FALSE | FALSE | backtime | 还书时间 | char(10) | 10 | FALSE | FALSE | FALSE | ifback | 是否归还 | char(5) | 5 | FALSE | FALSE | FALSE | manager
Name | Code | Data Type | Length | Precision | Primary | Foreign Key | Mandatory | id | 登陆账号 | char(10) | 10 | TRUE | FALSE | TRUE | name | 登录名 | char(10) | 10 | FALSE | FALSE | TRUE | pwd | 密码 | char(10) | 10 | FALSE | FALSE | FALSE | reader
Name | Code | Data Type | Length | Precision | Primary | Foreign Key | Mandatory | id | 登陆账号 | char(10) | 10 | TRUE | FALSE | TRUE | name | 登录名 | char(10) | 10 | FALSE | FALSE | TRUE | sex | 性别 | char(10) | 10 | FALSE | FALSE | FALSE | tel | 电话号 | char(11) | 11 | FALSE | FALSE | FALSE | E-mail | 邮箱 | char(20) | 20 | FALSE | FALSE | FALSE | ER 图:

逻辑结构设计
登录页面展示

登录后首页面

图书查询页面

借阅历史页面

用户管理页面

图书借阅页面

图书续借页面

图书归还页面

物理结构设计

SQL 脚本文件:
/*==============================================================*/
/* DBMS name: MySQL 5.0 */
/* Created on: 2015/12/22 13:11:58 */
/*==============================================================*/
drop table if exists book_type;
drop table if exists tb_bookcase;
drop table if exists tb_bookinfo;
drop table if exists tb_borrow;
drop table if exists tb_library;
drop table if exists tb_manager;
drop table if exists tb_publishing;
drop table if exists tb_reder;
drop table if exists tb——readertype;
/*==============================================================*/
/* Table: book_type */
/*==============================================================*/
create table book_type
(
id int not null,
typename varchar(30),
primary key (id)
);
/*==============================================================*/
/* Table: tb_bookcase */
/*==============================================================*/
create table tb_bookcase
(
id int not null,
name varchar(30),
primary key (id)
);
/*==============================================================*/
/* Table: tb_bookinfo */
/*==============================================================*/
create table tb_bookinfo
(
bookname varchar(70),
id int not null,
price float(8),
inTime date,
author varchar(30),
primary key (id)
);
/*==============================================================*/
/* Table: tb_borrow */
/*==============================================================*/
create table tb_borrow
(
id int not null,
readerid int,
bookid int,
borrowTime date,
backTime date,
ifback smallint,
operator varchar(30),
primary key (id)
);
/*==============================================================*/
/* Table: tb_library */
/*==============================================================*/
create table tb_library
(
id int not null,
libraryname varchar(50),
tel varchar(20),
adress varchar(100),
email varchar(100),
createData date,
introduce text,
primary key (id)
);
/*==============================================================*/
/* Table: tb_manager */
/*==============================================================*/
create table tb_manager
(
id int not null,
name varchar(30),
pwd varchar(30),
primary key (id)
);
/*==============================================================*/
/* Table: tb_publishing */
/*==============================================================*/
create table tb_publishing
(
ISBN varchar(20),
pubname varchar(30)
);
/*==============================================================*/
/* Table: tb_reder */
/*==============================================================*/
create table tb_reder
(
rid int not null,
name varchar(20),
sex varchar(4),
birthday date,
tel varchar(20),
email varchar(100),
createData date,
operator varchar(30),
remark text,
vocation varchar(50),
primary key (rid)
);
/*==============================================================*/
/* Table: tb——readertype */
/*==============================================================*/
create table tb——readertype
(
id int not null,
name varchar(50),
number int,
primary key (id)
);
总结
在这个过程中,我们可以获得了解数据库,创建数据库,构建数据库的过程,整个过程中,获得的不仅是代码的实现,以及界面的构造和创建。在数据库和 PHP 的连接过程上才是整个设计的关键所在,数据库作为一个基础知识为系统的创建以及数据的收集整理提供了很大的作用。在今后的学习上更应该注意各个软件的结合才行。 |
|