zoukankan      html  css  js  c++  java
  • 02 图书管理系统(SSM+LayUi)

    数据库表设计

    1、图书分类表

    drop table if exists class_info;
    
    /* ================================================= */
    /* Table: class_info */
    /* ================================================= */
    create table class_info
    (
        `id` int not null auto_increment,
        `name` varchar(15),
        `remarks` varchar(255),
        primary key(id) 
    );
    
    alter table class_info comment '图书的分类表';
    

    2、图书信息表

    drop table if exists book_info;
    
    /* ================================================= */
    /* Table: book_info */
    /* ================================================= */
    create table book_info
    (
        `id` int not null auto_increment,
        `name` varchar(15),
        `author` varchar(25),
        `publish` varchar(25),
        `ISBN` varchar(25) comment '标准书号',
        `introduction` text comment '书的介绍',
        `language` varchar(20) comment '语言',
        `price` double comment '价格信息',
        `pub_date` date comment '出版时间',
        `type_id` int(10) comment '来自图书分类表中的id',
        primary key(id) 
    );
    
    alter table book_info comment '图书的信息表';
    

    3、数据库管理员信息表

    drop table if exists admin;
    
    /* ================================================= */
    /* Table: admin */
    /* ================================================= */
    create table admin
    (
        `id` int(11) not null auto_increment comment '系统编号',
        `username` varchar(20) comment '用户名',
        `password` varchar(20) comment '登录密码',
        `type` int(11) comment '分类:
            普通管理员:0
            系统管理员:1',
        primary key(id) 
    );
    
    alter table admin comment '数据库管理员表
                               分为普通管理员和系统管理员';
    

    4、借阅信息表

    drop table if exists lend_list;
    
    /* ================================================= */
    /* Table: lend_list */
    /* ================================================= */
    create table lend_list
    (
        `id` int(11) auto_increment comment '系统编号',
        `book_id` int(11) comment '书的编号',
        `reader_id` int(11) comment '读者id',
        `lend_date` date comment '借出时间',
        `back_date` date comment '归还时间',
        `type` int(10) comment '归还图书类型:
            0:正常归还
            1:延期归还
            2:破损归还
            3:遗失处理
            4:其他',
        `remarks` varchar(255) comment '备注'
    );
    
    alter table lend_list comment '借书还书相关就录信息';
    
    

    5、借阅卡(图书卡)

    drop table if exists reader_card;
    
    /* ================================================= */
    /* Table: reader_card */
    /* ================================================= */
    create table reader_card
    (
        `id` int(11) auto_increment,
        `username` varchar(25) comment '登录名称',
        `password` varchar(25) comment '密码',
        `number` int(10)
    );
    
    alter table reader_card comment '借阅卡(图书卡)';
    

    6、读者信息表

    drop table if exists reader_info;
    
    /* ================================================= */
    /* Table: reader_info */
    /* ================================================= */
    create table reader_info
    (
        `id` int(11) auto_increment,
        `name` varchar(25) comment '读者姓名',
        `sex` varchar(5) comment '性别',
        `birthday` date comment '出生日期',
        `address` varchar(150) comment '地址',
        `tel` varchar(20) comment '电话',
        `email` varchar(50) comment '邮箱',
        `card_id` int(11)
    );
    
    alter table reader_info comment '读者信息表';
    

    7、公告信息表

    drop table if exists notice;
    
    /* ================================================= */
    /* Table: notice */
    /* ================================================= */
    create table notice
    (
        `id` int(11) auto_increment,
        `content` text comment '内容',
        `create_date` date comment '公告时间',
        `author` int(11) comment '发布人'
    );
    
    alter table notice comment '公告信息表';
    
  • 相关阅读:
    PS做图片,如何使背景透明
    C# 在线培训之零基础入门 01:开篇及C#程序、解决方案的结构
    C# 在线培训之零基础入门 02:源码管理之TFS入门
    [ASP.NET] 浅析HtmlForm控件
    Asp.net内置对象之Session
    Asp.net内置对象之Cookies
    [WinForm] 自动补全控件
    ASP.NET内置对象之Request对象
    C#开发Activex控件与JavaScript的互调
    XHTML学习资料(五)—— 表单
  • 原文地址:https://www.cnblogs.com/nuister/p/13361159.html
Copyright © 2011-2022 走看看