查看: 82|回复: 0

数据库课程设计项目-PHP开发网上图书管理系统

[复制链接]

4

主题

6

帖子

14

积分

新手上路

Rank: 1

积分
14
发表于 2023-1-15 13:56:27 | 显示全部楼层 |阅读模式
系统需求分析

系统功能结构模块

  • 系统设置:图书馆信息,用户设置,参数设置,书架设置
  • 图书借还:图书借阅,图书续借,图书归还
  • 系统查询:图书档案查询,图书借阅查询,节约到期查询
功能需求

  • 系统管理:定义读者类别并设置参数,添加、修改和删除读者信息。
  • 图书续借和预约:实现图书的续借、预约等功能。
  • 图书检索:按书名或作者等信息进行检索。
  • 借阅查询:查询个人借阅情况、未付罚款情况。
其他要求:读者未登录时,只能检索图书,登录后才能使用预约、续借和取消预约图书, 查询个人借阅史以及修改密码功能
概念结构设计

bookcase:
NameCodeData TypeLengthPrecisionPrimaryForeign KeyMandatory
id书号char(10)10TRUEFALSETRUE
name书名char(10)10FALSEFALSETRUE
bookinfo:
NameCodeData TypeLengthPrecisionPrimaryForeign KeyMandatory
Barcode条形码char(10)10TRUEFALSETRUE
bookname书名char(10)10FALSEFALSETRUE
typeid图书类型char(20)20FALSEFALSEFALSE
author作者FLOATFALSEFALSETRUE
Page页数FLOATFALSEFALSETRUE
bookcase书架char(Max)MaxFALSEFALSEFALSE
press出版社char(20)20FALSEFALSEFALSE
borrow:
NameCodeData TypeLengthPrecisionPrimaryForeign KeyMandatory
id登陆账号char(10)10TRUEFALSETRUE
readerid读者证char(10)10TRUEFALSETRUE
bookid条形码char(20)20TRUEFALSEFALSE
borrowtime借书时间char(10)10FALSEFALSEFALSE
backtime还书时间char(10)10FALSEFALSEFALSE
ifback是否归还char(5)5FALSEFALSEFALSE
manager
NameCodeData TypeLengthPrecisionPrimaryForeign KeyMandatory
id登陆账号char(10)10TRUEFALSETRUE
name登录名char(10)10FALSEFALSETRUE
pwd密码char(10)10FALSEFALSEFALSE
reader
NameCodeData TypeLengthPrecisionPrimaryForeign KeyMandatory
id登陆账号char(10)10TRUEFALSETRUE
name登录名char(10)10FALSEFALSETRUE
sex性别char(10)10FALSEFALSEFALSE
tel电话号char(11)11FALSEFALSEFALSE
E-mail邮箱char(20)20FALSEFALSEFALSE
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 的连接过程上才是整个设计的关键所在,数据库作为一个基础知识为系统的创建以及数据的收集整理提供了很大的作用。在今后的学习上更应该注意各个软件的结合才行。
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

快速回复 返回顶部 返回列表