欢迎来到冰点文库! | 帮助中心 分享价值,成长自我!
冰点文库
全部分类
  • 临时分类>
  • IT计算机>
  • 经管营销>
  • 医药卫生>
  • 自然科学>
  • 农林牧渔>
  • 人文社科>
  • 工程科技>
  • PPT模板>
  • 求职职场>
  • 解决方案>
  • 总结汇报>
  • ImageVerifierCode 换一换
    首页 冰点文库 > 资源分类 > DOCX文档下载
    分享到微信 分享到微博 分享到QQ空间

    图书管理系统数据库设计MYSQL实现 2Word下载.docx

    • 资源ID:7795403       资源大小:16KB        全文页数:6页
    • 资源格式: DOCX        下载积分:1金币
    快捷下载 游客一键下载
    账号登录下载
    微信登录下载
    三方登录下载: 微信开放平台登录 QQ登录
    二维码
    微信扫一扫登录
    下载资源需要1金币
    邮箱/手机:
    温馨提示:
    快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。
    如填写123,账号就是123,密码也是123。
    支付方式: 支付宝    微信支付   
    验证码:   换一换

    加入VIP,免费下载
     
    账号:
    密码:
    验证码:   换一换
      忘记密码?
        
    友情提示
    2、PDF文件下载后,可能会被浏览器默认打开,此种情况可以点击浏览器菜单,保存网页到桌面,就可以正常下载了。
    3、本站不支持迅雷下载,请使用电脑自带的IE浏览器,或者360浏览器、谷歌浏览器下载即可。
    4、本站资源下载后的文档和图纸-无水印,预览文档经过压缩,下载后原文更清晰。
    5、试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。

    图书管理系统数据库设计MYSQL实现 2Word下载.docx

    1、 3.学生借阅图书之前需要将自己的个人信息注册,登陆时对照学生信息。 4.学生直接归还图书,根据图书编码修改借阅信息 5.管理员登陆管理系统后,可以修改图书信息,增加或者删除图书信息 6.管理员可以注销学生信息。 通过需求定义,画出图书管理系统的数据流图: 数据流图 二、系统功能设计 画出系统功能模块图并用文字对各功能模块进行详细介绍。系统功能模块图: 三、数据库设计方案图表 1、系统E-R模型 总体E-R图: 精细化的局部E-R图: 学生借阅-归还E-R图: 管理员E-R图: 2、设计表 给出设计的表名、结构以及表上设计的完整性约束。student: book: book_sort: bor

    2、row:存储学生的借书信息 return_table:存储学生的归还信息 ticket:存储学生的罚单信息 manager: 3、设计索引 给出在各表上建立的索引以及使用的语句。 student: 1.为stu_id创建索引,升序排序 sql:create index index_id on student(stu_id asc); 2.为stu_name创建索引,并且降序排序 alter table student add index index_name(stu_name, desc); 插入索引操作和结果如下所示: mysql create index index_id on stude

    3、nt(stu_id asc); Query OK, 0 rows affected Records: 0 Duplicates: 0 Warnings: 0 alter table student add index index_name(stu_name desc); 1.为book_id创建索引,升序排列 create index index_bid on book(book_id); 2.为book_record创建索引,以便方便查询图书的登记日期信息,升序:sql:create index index_brecord on book(book_record); 插入索引的操作和结果如下

    4、所示: create index index_bid on book(book_id); create index index_brecord on book(book_record); 1.为stu_id和book_id创建多列索引:create index index_sid_bid on borrow(stu_id asc, book_id asc); create index index_sid_bid on borrow(stu_id asc, book_id asc);create index index_sid_bid on return_table(stu_id asc, bo

    5、ok_id asc); create index index_sid_bid_r on return_table(stu_id asc, book_id asc); 1. 为stu_id和book_id创建多列索引:create index index_sid_bid on ticket(stu_id asc, book_id asc); create index index_sid_bid on ticket(stu_id asc, book_id asc); 1.为manager_id创建索引:create index index_mid on manager(manager_id); c

    6、reate index index_mid on manager(manager_id); 4、设计视图 给出在各表上建立的视图以及使用的语句。 1.在表student上创建计算机专业(cs)学生的视图stu_cs: create view stu_cs as select * from student where pro = cs; 操作和结果: where stu_pro = cs; 2. 在表student, borrow和book上创建借书者的全面信息视图stu_borrow: create view stu_borrow as select student.stu_id, book.

    7、book_id, student.stu_name, book.book_name, borrow_date,adddate(borrow_date,30) expect_return_date from student, book, borrow where student.stu_id = borrow.stu_id and book.book_id = borrow.book_id; 3.创建类别1的所有图书的视图cs_book: create view cs_book as from book where book.book_sort in from book_sort where s

    8、ort_id = 1); 操作和结果显示: (select book_sort.sort_name 4.创建个人所有借书归还纪录视图stu_borrow_return: create view stu_borrow_return as select student.stu_id, student.stu_name, book.book_id, book.book_name,return_table.borrow_date,return_table.return_date from student, book, return_table where student.stu_id = return

    9、_table.stu_id and book.book_id = return_table.book_id; 5、设计触发器 给出在各表上建立的触发器以及使用的语句。 1.设计触发器borrow, 当某学生借书成功后,图书表相应的图书不在架上,变为0: create trigger borrow after insert on borrow for each row begin update book set book_num = book_num 1 where book_id = new.book_id; end 操作与结果显示: delimiter $ create trigger tr

    10、igger_borrow - update book set book_num = book_num - 1 $ 在插入表borrow之前,book_id = 1 的图书还在架上,为1: 学生1借了这本书后,在borrow中插入了一条记录: 在borrow中插入这条记录后,book_id =1的图书,不在架上,为0: 2.设计触发器trigger_return,还书成功后,对应的书籍book_num变为1: create trigger trigger_return after insert on return_table update book set book_num = book_num + 1 还书时在return_table插入表项: 此时图书归还架上: 3.定义定时器(事件)eventJob,每天自动触发一次,扫描视图stu_borrow,若发现当前有预期归还时间小于当前时间,则判断为超期,生成处罚记录,这个定时器将每天定时触发存储过程proc_gen_ticket:


    注意事项

    本文(图书管理系统数据库设计MYSQL实现 2Word下载.docx)为本站会员主动上传,冰点文库仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。 若此文所含内容侵犯了您的版权或隐私,请立即通知冰点文库(点击联系客服),我们立即给予删除!

    温馨提示:如果因为网速或其他原因下载失败请重新下载,重复下载不扣分。




    关于我们 - 网站声明 - 网站地图 - 资源地图 - 友情链接 - 网站客服 - 联系我们

    copyright@ 2008-2023 冰点文库 网站版权所有

    经营许可证编号:鄂ICP备19020893号-2


    收起
    展开