欢迎来到三一办公! | 帮助中心 三一办公31ppt.com(应用文档模板下载平台)
三一办公
全部分类
  • 办公文档>
  • PPT模板>
  • 建筑/施工/环境>
  • 毕业设计>
  • 工程图纸>
  • 教育教学>
  • 素材源码>
  • 生活休闲>
  • 临时分类>
  • ImageVerifierCode 换一换
    首页 三一办公 > 资源分类 > PPT文档下载  

    mysql图书馆管理系统的数据.ppt

    • 资源ID:5441051       资源大小:1.28MB        全文页数:16页
    • 资源格式: PPT        下载积分:15金币
    快捷下载 游客一键下载
    会员登录下载
    三方登录下载: 微信开放平台登录 QQ登录  
    下载资源需要15金币
    邮箱/手机:
    温馨提示:
    用户名和密码都是您填写的邮箱或者手机号,方便查询和重复下载(系统自动生成)
    支付方式: 支付宝    微信支付   
    验证码:   换一换

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

    mysql图书馆管理系统的数据.ppt

    mysql图书馆管理系统的数据库,数据库 library,操作员表 operator书库 books学生信息表 students_information操作过程表 process,操作员表 operator,操作员表 operator,create table operator(id char(9)not null primary key,name varchar(10)not null);insert into operator values(100001230,aa),(100001231,bb),(100001232,cc),(100001233,dd),(100001234,ee),(100001235,ff);,书库 books,书库 books,create table books(title varchar(20)not null,date_of_publication date,author varchar(15)not null,ISBN char(13)not null primary key,number_of_copies int not null,position varchar(30);insert into books values(没有任何借口,2008-11-01,杰伊.瑞芬博瑞,9787500683858,20,二楼 成功/激励),(钢铁是怎样炼成的,1997-05-12,奥斯特洛夫斯基,9787530125403,25,二楼 成功/激励),(水浒传,1998-11-15,施耐庵,9787530112454,10,一楼文学类),(小时代,2009-11-15,郭敬明,9782345612454,1,一楼文学类);,学生信息表 students_information,学生信息表 students_information,create table students_information(id char(9)not null primary key,name varchar(10)not null,sex char(2),phone_number char(11),department varchar(10);insert into students_information values 财经财经财经财经计算机科学与运用计算机科学与运用计算机科学与运用计算机科学与运用土木工程);,操作过程表 process,操作过程表 process,create table process(title varchar(20),ISBN char(13),bgname varchar(10),bg_id char(9),operator_name varchar(10),operator_id char(9),btime varchar(20),gtime varchar(20),is_give bool);insert into process values(书名,isbn号,借/还书人,000000000,操作员姓名,000000000,借书时间,还书时间,1);,借书存储过程,delimiter|create procedure zj_borrow(in book_id char(13),in b_id char(9),in o_id char(9)begin declare booktitle varchar(20);declare borrowname varchar(10);declare op_name varchar(10);declare bstime varchar(20);declare num int;set num=1;set bstime=now();set booktitle=(select title from books where ISBN=book_id);set borrowname=(select name from students_information where id=b_id);set op_name=(select name from operator where id=o_id);,借书存储过程,if(select number_of_copies from books where ISBN=book_id)=num and book_id in(select ISBN from books)and b_id in(select id from students_information)and o_id in(select id from operator)and(select is_give from process where btime=(select max(btime)from process where bg_id=b_id)=1 or b_id not in(select bg_id from process)then update books set number_of_copies=number_of_copies-1 where ISBN=book_id;insert into process values(booktitle,book_id,borrowname,b_id,op_name,o_id,bstime,null,0);end if;end|delimiter;,检测借书过程,call zj_borrow(9787530125403,100000001,100001231);select*from process;select*from books;call zj_borrow(9787530125403,100000001,100001231);call zj_borrow(9787530125404,100000001,100001231);call zj_borrow(9787530125403,190000001,100001231);call zj_borrow(9787530125403,100000001,190001231);call zj_borrow(9782345612454,100010002,100001234);call zj_borrow(9782345612454,100020001,100001232);,创建还书过程,delimiter|create procedure zj_give(in b_id char(13),in g_id char(9),in o_id char(9)begin declare stime varchar(20);declare gstime varchar(20);set gstime=now();set stime=(select max(btime)from process where bg_id=g_id);if(select is_give from process where ISBN=b_id and bg_id=g_id and operator_id=o_id and btime=stime)=0 then update process set gtime=gstime where ISBN=b_id and bg_id=g_id and operator_id=o_id and btime=stime;update process set is_give=1 where ISBN=b_id and bg_id=g_id and operator_id=o_id and btime=stime;update books set number_of_copies=number_of_copies+1 where ISBN=b_id;end if;end|delimiter;,检测还书过程,call zj_give(9787530125403,100000001,100001231);select*from process;select*from books;call zj_give(9787530125403,100000001,100001231);call zj_give(9787530125404,100000001,100001231);call zj_give(9787530125403,190000001,100001231);call zj_give(9787530125403,100000001,190001231);call zj_give(9787500683858,100000003,100001235);,Thank you,

    注意事项

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

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




    备案号:宁ICP备20000045号-2

    经营许可证:宁B2-20210002

    宁公网安备 64010402000987号

    三一办公
    收起
    展开