已閱讀5頁(yè),還剩13頁(yè)未讀, 繼續(xù)免費(fèi)閱讀
版權(quán)說(shuō)明:本文檔由用戶(hù)提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
mysql圖書(shū)館管理系統(tǒng)的數(shù)據(jù)庫(kù) 數(shù)據(jù)庫(kù)library 操作員表operator書(shū)庫(kù)books學(xué)生信息表students information操作過(guò)程表process 操作員表operator 操作員表operator createtableoperator idchar 9 notnullprimarykey namevarchar 10 notnull insertintooperatorvalues 100001230 aa 100001231 bb 100001232 cc 100001233 dd 100001234 ee 100001235 ff 書(shū)庫(kù)books 書(shū)庫(kù)books createtablebooks titlevarchar 20 notnull date of publicationdate authorvarchar 15 notnull ISBNchar 13 notnullprimarykey number of copiesintnotnull positionvarchar 30 insertintobooksvalues 沒(méi)有任何借口 2008 11 01 杰伊 瑞芬博瑞 9787500683858 20 二樓 成功 激勵(lì) 鋼鐵是怎樣煉成的 1997 05 12 奧斯特洛夫斯基 9787530125403 25 二樓 成功 激勵(lì) 水滸傳 1998 11 15 施耐庵 9787530112454 10 一樓 文學(xué)類(lèi) 小時(shí)代 2009 11 15 郭敬明 9782345612454 1 一樓 文學(xué)類(lèi) 學(xué)生信息表students information 學(xué)生信息表students information createtablestudents information idchar 9 notnullprimarykey namevarchar 10 notnull sexchar 2 phone numberchar 11 departmentvarchar 10 insertintostudents informationvalues 100000001 aa MM財(cái)經(jīng) 100000002 bb GG財(cái)經(jīng) 100000003 cc MM財(cái)經(jīng) 100000004 dd MM財(cái)經(jīng) 100010001 ab GG計(jì)算機(jī)科學(xué)與運(yùn)用 100010002 bc MM計(jì)算機(jī)科學(xué)與運(yùn)用 100010003 cd GG計(jì)算機(jī)科學(xué)與運(yùn)用 100010004 de MM計(jì)算機(jī)科學(xué)與運(yùn)用 100020001 ef GG土木工程 9 可編輯 操作過(guò)程表process 操作過(guò)程表process createtableprocess titlevarchar 20 ISBNchar 13 bgnamevarchar 10 bg idchar 9 operator namevarchar 10 operator idchar 9 btimevarchar 20 gtimevarchar 20 is givebool insertintoprocessvalues 書(shū)名 isbn號(hào) 借 還書(shū)人 000000000 操作員姓名 000000000 借書(shū)時(shí)間 還書(shū)時(shí)間 1 借書(shū)存儲(chǔ)過(guò)程 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 借書(shū)存儲(chǔ)過(guò)程 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 檢測(cè)借書(shū)過(guò)程 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 創(chuàng)建還書(shū)過(guò)程 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 檢測(cè)還書(shū)過(guò)程 callzj give 9787530125403 100000001 100001231 select fromprocess select frombooks callzj give 9787530125403 100000001 100001231 callzj give 978753012
溫馨提示
- 1. 本站所有資源如無(wú)特殊說(shuō)明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶(hù)所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒(méi)有圖紙預(yù)覽就沒(méi)有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶(hù)上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶(hù)上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶(hù)因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年大學(xué)大四(審計(jì)學(xué))審計(jì)案例分析綜合測(cè)試題及答案
- 2025年大學(xué)食品加工工藝(糖果烘焙技術(shù))試題及答案
- 2025年高職第一學(xué)年(工藝美術(shù)品設(shè)計(jì))工藝品收藏基礎(chǔ)綜合測(cè)試試題及答案
- 2025年中職(食品加工技術(shù))食品衛(wèi)生基礎(chǔ)試題及答案
- 五年級(jí)語(yǔ)文(能力突破)2027年上學(xué)期期末測(cè)試卷
- 2025年高職工程造價(jià)(工程咨詢(xún)基礎(chǔ))試題及答案
- 2026年注冊(cè)土木工程師水利水電工程規(guī)劃(專(zhuān)業(yè)案例考試上)試題及答案
- 2025年中職(焊接技術(shù))電阻焊操作試題及解析
- 2025年中職烹飪工藝與營(yíng)養(yǎng)(原料加工技術(shù))試題及答案
- 2026年馬來(lái)語(yǔ)學(xué)習(xí)(馬來(lái)語(yǔ)閱讀)考題及答案
- 2025棗莊市生態(tài)環(huán)境修復(fù)礦區(qū)復(fù)墾政策實(shí)施效果與國(guó)土空間規(guī)劃
- 2025廣東廣電網(wǎng)絡(luò)校園招聘筆試歷年參考題庫(kù)附帶答案詳解
- 江蘇大學(xué)《無(wú)機(jī)與分析化學(xué)實(shí)驗(yàn)B》2025-2026學(xué)年第一學(xué)期期末試卷
- 2025GINA全球哮喘處理和預(yù)防策略(更新版)解讀課件
- 2025年中國(guó)職場(chǎng)人心理健康調(diào)查研究報(bào)告
- 2025~2026學(xué)年山東省德州市高二上學(xué)期九校聯(lián)考英語(yǔ)試卷
- 第24課《寓言四則》課件2025-2026學(xué)年統(tǒng)編版語(yǔ)文七年級(jí)上冊(cè)
- 前牙區(qū)種植修復(fù)的美學(xué)效果與臨床觀(guān)察
- 墓地購(gòu)置協(xié)議書(shū)范本
- 國(guó)家開(kāi)放大學(xué)電大本科【國(guó)際私法】2025年期末試題及答案
- 稅收實(shí)務(wù)中關(guān)稅課件
評(píng)論
0/150
提交評(píng)論