已阅读5页,还剩13页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
mysql图书馆管理系统的数据库 数据库library 操作员表operator书库books学生信息表students information操作过程表process 操作员表operator 操作员表operator createtableoperator idchar 9 notnullprimarykey namevarchar 10 notnull insertintooperatorvalues 100001230 aa 100001231 bb 100001232 cc 100001233 dd 100001234 ee 100001235 ff 书库books 书库books createtablebooks titlevarchar 20 notnull date of publicationdate authorvarchar 15 notnull ISBNchar 13 notnullprimarykey number of copiesintnotnull positionvarchar 30 insertintobooksvalues 没有任何借口 2008 11 01 杰伊 瑞芬博瑞 9787500683858 20 二楼 成功 激励 钢铁是怎样炼成的 1997 05 12 奥斯特洛夫斯基 9787530125403 25 二楼 成功 激励 水浒传 1998 11 15 施耐庵 9787530112454 10 一楼 文学类 小时代 2009 11 15 郭敬明 9782345612454 1 一楼 文学类 学生信息表students information 学生信息表students information createtablestudents information idchar 9 notnullprimarykey namevarchar 10 notnull sexchar 2 phone numberchar 11 departmentvarchar 10 insertintostudents informationvalues 100000001 aa MM财经 100000002 bb GG财经 100000003 cc MM财经 100000004 dd MM财经 100010001 ab GG计算机科学与运用 100010002 bc MM计算机科学与运用 100010003 cd GG计算机科学与运用 100010004 de MM计算机科学与运用 100020001 ef GG土木工程 9 可编辑 操作过程表process 操作过程表process createtableprocess titlevarchar 20 ISBNchar 13 bgnamevarchar 10 bg idchar 9 operator namevarchar 10 operator idchar 9 btimevarchar 20 gtimevarchar 20 is givebool insertintoprocessvalues 书名 isbn号 借 还书人 000000000 操作员姓名 000000000 借书时间 还书时间 1 借书存储过程 delimiter createprocedurezj borrow inbook idchar 13 inb idchar 9 ino idchar 9 begindeclarebooktitlevarchar 20 declareborrownamevarchar 10 declareop namevarchar 10 declarebstimevarchar 20 declarenumint setnum 1 setbstime now setbooktitle selecttitlefrombookswhereISBN book id setborrowname selectnamefromstudents informationwhereid b id setop name selectnamefromoperatorwhereid o id 借书存储过程 if selectnumber of copiesfrombookswhereISBN book id numandbook idin selectISBNfrombooks andb idin selectidfromstudents information ando idin selectidfromoperator and selectis givefromprocesswherebtime selectmax btime fromprocesswherebg id b id 1orb idnotin selectbg idfromprocess thenupdatebookssetnumber of copies number of copies 1whereISBN book id insertintoprocessvalues booktitle book id borrowname b id op name o id bstime null 0 endif end delimiter 检测借书过程 callzj borrow 9787530125403 100000001 100001231 select fromprocess select frombooks callzj borrow 9787530125403 100000001 100001231 callzj borrow 9787530125404 100000001 100001231 callzj borrow 9787530125403 190000001 100001231 callzj borrow 9787530125403 100000001 190001231 callzj borrow 9782345612454 100010002 100001234 callzj borrow 9782345612454 100020001 100001232 创建还书过程 delimiter createprocedurezj give inb idchar 13 ing idchar 9 ino idchar 9 begindeclarestimevarchar 20 declaregstimevarchar 20 setgstime now setstime selectmax btime fromprocesswherebg id g id if selectis givefromprocesswhereISBN b idandbg id g idandoperator id o idandbtime stime 0thenupdateprocesssetgtime gstimewhereISBN b idandbg id g idandoperator id o idandbtime stime updateprocesssetis give 1whereISBN b idandbg id g idandoperator id o idandbtime stime updatebookssetnumber of copies number of copies 1whereISBN b id endif end delimiter 检测还书过程 callzj give 9787530125403 100000001 100001231 select fromprocess select frombooks callzj give 9787530125403 100000001 100001231 callzj give 978753012
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 湖南省长沙市宁乡市校联考2026-2027学年七年级上学期11月期中历史试卷-原卷版
- 河北省邯郸市永年区2026-2027学年七年级上学期11月期中历史试卷(含答案)
- 仓库管理名词解释试题及参考答案
- 2025-2026学年四川省泸州市泸县五中高一(下)开学语文试卷(含答案)
- 交通规则模拟考试试卷(含答案解析)
- 事业编情景模拟面试题及参考答案
- 高中政治必修一教学设计:社会主义发展历程的逻辑与史实互证
- 高三地理教案:茶树种植区域分布与品质形成机制一轮复习导学案设计
- 大四食品工艺学期末食品微生物学试题及答案
- 高中物理选择性必修一《楞次定律的建模推演与能量守恒论证》教学设计
- 韧性视角下社区应急管理能力评价指标体系构建及应用研究
- 2026年铁路驻站联络员试题模拟带答案
- 成都新都投资集团有限公司2026年招聘市场运营部副部长等岗位(13人)笔试备考题库及答案解析
- 慢性心力衰竭规范化诊疗指南(2026版)
- 2026年全科副主任医师 副高职称面审答辩题库
- 2026秋小学人教版数学三年级上册《三 毫米、分米和千米》易错题专项练习含答案
- 江苏省自考02356数字信号处理高频考点重点
- 2026年甘肃省从优 秀村干部中考试录用乡镇机关公务员(公共知识)测试题及答案
- 2026年东华大学纺纱学考试试题及答案
- ISO 218982024 包装-用于非危险货物的柔性中间散装容器(FIBC)标准立项发展报告
- 2026年基层抗菌药物使用管控培训考试题(含答案)
评论
0/150
提交评论