ImageVerifierCode 换一换
格式:DOCX , 页数:24 ,大小:428.43KB ,
资源ID:548196      下载积分:12 金币
快捷下载
登录下载
邮箱/手机:
温馨提示:
快捷下载时,用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)。 如填写123,账号就是123,密码也是123。
特别说明:
请自助下载,系统不会自动发送文件的哦; 如果您已付费,想二次下载,请登录后访问:我的下载记录
支付方式: 支付宝    微信支付   
验证码:   换一换

加入VIP,免费下载
 

温馨提示:由于个人手机设置不同,如果发现不能下载,请复制以下地址【https://www.bdocx.com/down/548196.html】到电脑端继续下载(重复下载不扣费)。

已注册用户请登录:
账号:
密码:
验证码:   换一换
  忘记密码?
三方登录: 微信登录   QQ登录  

下载须知

1: 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。
2: 试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓。
3: 文件的所有权益归上传用户所有。
4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
5. 本站仅提供交流平台,并不能对任何下载内容负责。
6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

版权提示 | 免责声明

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

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

1、图书管理系统数据库设计MYSQL实现图书管理系统数据库设计一、系统概述1、系统简介图书管理是每个图书馆都需要进行的工作。一个设计良好的图书管理系统数据库能够给图书管理带来很大的便利。2、需求分析图书管理系统的需求定义为:1.学生可以直接通过借阅终端来查阅书籍信息,同时也可以查阅自己的借阅信息。2.当学生需要借阅书籍时,通过账号密码登陆借阅系统,借阅系统处理学生的借阅,同时修改图书馆保存的图书信息,修改被借阅的书籍是否还有剩余,同时更新学生个人的借阅信息。3.学生借阅图书之前需要将自己的个人信息注册,登陆时对照学生信息。4.学生直接归还图书,根据图书编码修改借阅信息5.管理员登陆管理系统后,可以

2、修改图书信息,增加或者删除图书信息6.管理员可以注销学生信息。通过需求定义,画出图书管理系统的数据流图:数据流图二、系统功能设计 画出系统功能模块图并用文字对各功能模块进行详细介绍。系统功能模块图:三、数据库设计方案图表 1、系统E-R模型总体E-R图:精细化的局部E-R图:学生借阅-归还E-R图:管理员E-R图: 2、设计表 给出设计的表名、结构以及表上设计的完整性约束。student:列名数据类型是否为空/性质说明stu_idintnot null /PK标明学生唯一学号stu_namevarcharnot null学生姓名stu_sexvarcharnot null学生性别stu_age

3、intnot 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书籍分类b

4、ook_recorddatatimenull书籍登记日期book_sort:列名数据类型是否为空/性质说明sort_idvarcharnot null / PK类型编号sort_namevarcharnot null类型名称borrow:存储学生的借书信息列名数据类型是否为空/性质说明student_idvarcharnot null / PK学生编号book_idvarchar not null / PK书籍编号borrow_datedatatimenull借书时间expect_return_datedatetimenull预期归还时间return_table:存储学生的归还信息列名数据类型

5、是否为空/性质说明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:列名数据类型是否为空/性质说明manage

6、r_idvarcharnot null / 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_n

7、ame, 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 affectedRecords: 0 Duplicates: 0 Warnings: 0mysqlbook:1.为book_id创建索引,升序排列sql:create

8、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);Q

9、uery OK, 0 rows affectedRecords: 0 Duplicates: 0 Warnings: 0borrow:1.为stu_id和book_id创建多列索引:sql:create index index_sid_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:

10、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:cr

11、eate index index_sid_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

12、 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 as select * from student where pro = cs;操作和结果:mysql create view stu_cs as select * from student where stu_

13、pro = cs;Query OK, 0 rows affected2. 在表student, borrow和book上创建借书者的全面信息视图stu_borrow:sql: create view stu_borrow as select student.stu_id, book.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

14、_id and book.book_id = borrow.book_id;操作和结果:mysql create view stu_borrow as select student.stu_id, book.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;Query OK, 0 rows affected3.创建类别1的所有图书的视图cs_book:sql: create view cs_book as select * from book where book.book_sort in (select book_sort.sort.name from boo

copyright@ 2008-2022 冰豆网网站版权所有

经营许可证编号:鄂ICP备2022015515号-1