电子文档交易市场
安卓APP | ios版本
电子文档交易市场
安卓APP | ios版本

图书管理系统数据库设计-MYSQL实现

31页
  • 卖家[上传人]:M****1
  • 文档编号:490238170
  • 上传时间:2023-05-17
  • 文档格式:DOCX
  • 文档大小:523.59KB
  • / 31 举报 版权申诉 马上下载
  • 文本预览
  • 下载提示
  • 常见问题
    • 1、图书管理系统数据库设计一、系统概述1、系统简介图书管理是每个图书馆都需要进行的工作。一个设计良好的图书管理系统数据库能够给图书管理带来很大的便利。2、需求分析图书管理系统的需求定义为:1.学生可以直接通过借阅终端来查阅书籍信息,同时也可以查阅自己的借阅信息。2.当学生需要借阅书籍时,通过账号密码登陆借阅系统,借阅系统处理学生的借阅,同时修改图书馆保存的图书信息,修改被借阅的书籍是否还有剩余,同时更新学生个人的借阅信息。3.学生借阅图书之前需要将自己的个人信息注册,登陆时对照学生信息。4.学生直接归还图书,根据图书编码修改借阅信息5.管理员登陆管理系统后,可以修改图书信息,增加或者删除图书信息6.管理员可以注销学生信息。通过需求定义,画出图书管理系统的数据流图:数据流图二、系统功能设计 画出系统功能模块图并用文字对各功能模块进行详细介绍。系统功能模块图:三、数据库设计方案图表 1、系统E-R模型总体E-R图:精细化的局部E-R图:学生借阅-归还E-R图:管理员E-R图: 2、设计表 给出设计的表名、结构以及表上设计的完整性约束。student:列名数据类型是否为空/性质说明stu_idi

      2、ntnot null /PK标明学生唯一学号stu_namevarcharnot null学生姓名stu_sexvarcharnot null学生性别stu_ageintnot null学生年龄stu_provarcharnot null学生专业stu_gradevarcharnot null学生年级stu_integrityintnot null/default=1学生诚信级book:列名数据类型是否为空/性质说明book_idintnot null / PK唯一书籍序号book_namevarcharnot null书籍名称book_authorvarcharnot null书籍作者book_pubvarcharnot null书籍出版社book_numint not null 书籍是否在架上book_sortvarcharnot null书籍分类book_recorddatatimenull书籍登记日期book_sort:列名数据类型是否为空/性质说明sort_idvarcharnot null / PK类型编号sort_namevarcharnot null类型名称borrow

      3、:存储学生的借书信息列名数据类型是否为空/性质说明student_idvarcharnot null / PK学生编号book_idvarchar not null / PK书籍编号borrow_datedatatimenull借书时间expect_return_datedatetimenull预期归还时间return_table:存储学生的归还信息列名数据类型是否为空/性质说明student_idvarcharnot null / PK学生编号book_idvarchar not null / PK书籍编号borrow_datedatetimenull借书时间return_datedatatimenull实际还书时间ticket:存储学生的罚单信息列名数据类型是否为空/性质说明student_idvarcharnot null / PK学生编号book_idvarchar not null / PK书籍编号over_dateintnull超期天数ticket_feefloatnull处罚金额manager:列名数据类型是否为空/性质说明manager_idvarcharnot nul

      4、l / PK管理员编号manager_namevarchar not null 管理员姓名manager_agevarcharnot null管理员年龄manager_phonevarcharnot null管理员电话 3、设计索引给出在各表上建立的索引以及使用的语句。student:1.为stu_id创建索引,升序排序sql:create index index_id on student(stu_id asc);2.为stu_name创建索引,并且降序排序sql:alter table student add index index_name(stu_name, desc);插入索引操作和结果如下所示:mysql create index index_id on student(stu_id asc);Query OK, 0 rows affectedRecords: 0 Duplicates: 0 Warnings: 0mysql alter table student add index index_name(stu_name desc);Query OK, 0 rows af

      5、fectedRecords: 0 Duplicates: 0 Warnings: 0mysqlbook:1.为book_id创建索引,升序排列sql:create index index_bid on book(book_id);2.为book_record创建索引,以便方便查询图书的登记日期信息,升序:sql:create index index_brecord on book(book_record);插入索引的操作和结果如下所示:mysql create index index_bid on book(book_id);Query OK, 0 rows affectedRecords: 0 Duplicates: 0 Warnings: 0mysql create index index_brecord on book(book_record);Query OK, 0 rows affectedRecords: 0 Duplicates: 0 Warnings: 0borrow:1.为stu_id和book_id创建多列索引:sql:create index index_sid_

      6、bid on borrow(stu_id asc, book_id asc);插入索引的操作和结果如下所示:mysql create index index_sid_bid on borrow(stu_id asc, book_id asc);Query OK, 0 rows affectedRecords: 0 Duplicates: 0 Warnings: 0return_table:1.为stu_id和book_id创建多列索引:sql:create index index_sid_bid on return_table(stu_id asc, book_id asc);插入索引的操作和结果如下所示:mysql create index index_sid_bid_r on return_table(stu_id asc, book_id asc);Query OK, 0 rows affectedRecords: 0 Duplicates: 0 Warnings: 0ticket:1. 为stu_id和book_id创建多列索引:sql:create index index_s

      7、id_bid on ticket(stu_id asc, book_id asc);插入索引的操作和结果如下所示:mysql create index index_sid_bid on ticket(stu_id asc, book_id asc);Query OK, 0 rows affectedRecords: 0 Duplicates: 0 Warnings: 0manager:1.为manager_id创建索引:sql:create index index_mid on manager(manager_id);插入索引的操作和结果如下所示:mysql create index index_mid on manager(manager_id);Query OK, 0 rows affectedRecords: 0 Duplicates: 0 Warnings: 0 4、设计视图 给出在各表上建立的视图以及使用的语句。1.在表student上创建计算机专业(cs)学生的视图stu_cs:sql: create view stu_cs asselect *from studentwh

      8、ere pro = cs;操作和结果:mysql create view stu_cs asselect *from studentwhere stu_pro = cs;Query OK, 0 rows affected2. 在表student, borrow和book上创建借书者的全面信息视图stu_borrow:sql: create view stu_borrow asselect student.stu_id, book.book_id, student.stu_name, book.book_name, borrow_date,adddate(borrow_date,30) expect_return_datefrom student, book, borrowwhere student.stu_id = borrow.stu_id and book.book_id = borrow.book_id;操作和结果:mysql create view stu_borrow asselect student.stu_id, book.book_id, student.stu_name, book.book_name, borrow_date,adddate(borrow_date,30) expect_return_datefrom student, book, borrowwhere student.stu_id = borrow.stu_id and book.book_id = borrow.book_id;Query OK, 0 rows affected3.创建类别1的所有图书的视图cs_book:sql: create view cs_book asselect *from bookwhere book.book_sort infrom book_sortwhere sort_id = 1);操作和结果显示:mysq

      《图书管理系统数据库设计-MYSQL实现》由会员M****1分享,可在线阅读,更多相关《图书管理系统数据库设计-MYSQL实现》请在金锄头文库上搜索。

      点击阅读更多内容
    最新标签
    监控施工 信息化课堂中的合作学习结业作业七年级语文 发车时刻表 长途客运 入党志愿书填写模板精品 庆祝建党101周年多体裁诗歌朗诵素材汇编10篇唯一微庆祝 智能家居系统本科论文 心得感悟 雁楠中学 20230513224122 2022 公安主题党日 部编版四年级第三单元综合性学习课件 机关事务中心2022年全面依法治区工作总结及来年工作安排 入党积极分子自我推荐 世界水日ppt 关于构建更高水平的全民健身公共服务体系的意见 空气单元分析 哈里德课件 2022年乡村振兴驻村工作计划 空气教材分析 五年级下册科学教材分析 退役军人事务局季度工作总结 集装箱房合同 2021年财务报表 2022年继续教育公需课 2022年公需课 2022年日历每月一张 名词性从句在写作中的应用 局域网技术与局域网组建 施工网格 薪资体系 运维实施方案 硫酸安全技术 柔韧训练 既有居住建筑节能改造技术规程 建筑工地疫情防控 大型工程技术风险 磷酸二氢钾 2022年小学三年级语文下册教学总结例文 少儿美术-小花 2022年环保倡议书模板六篇 2022年监理辞职报告精选 2022年畅想未来记叙文精品 企业信息化建设与管理课程实验指导书范本 草房子读后感-第1篇 小数乘整数教学PPT课件人教版五年级数学上册 2022年教师个人工作计划范本-工作计划 国学小名士经典诵读电视大赛观后感诵读经典传承美德 医疗质量管理制度 2
    关于金锄头网 - 版权申诉 - 免责声明 - 诚邀英才 - 联系我们
    手机版 | 川公网安备 51140202000112号 | 经营许可证(蜀ICP备13022795号)
    ©2008-2016 by Sichuan Goldhoe Inc. All Rights Reserved.