【正文】
在此謝謝老師和同學(xué)的幫忙,順利完成了我大 學(xué)的第一個課程設(shè)計。 通過這次的數(shù)據(jù)庫課程設(shè)計,開始對數(shù)據(jù)庫的應(yīng)用有了初步的了解,知道了怎么通過編程建立一個具有一定功能的系統(tǒng)。再以后 SQL 建表時也不確定。在畫數(shù)據(jù)流程圖和完成數(shù)據(jù)字典的時候,其實遇到很多困難,主要集中在數(shù)據(jù)字典中,數(shù)據(jù)項的填寫很亂,我們覺得我們完成的結(jié)果中應(yīng)該存在很多問題。按照書上介紹的數(shù)據(jù)庫設(shè)計的步驟,我首先進行需求分析,得到了圖書管理員詳細(xì)的回答后,我想的是這些細(xì)節(jié)的東西應(yīng)該應(yīng)用到我們具體哪些步驟中。 總結(jié) 這次的課程設(shè)計是我進入大學(xué)接觸的第一個 有關(guān)于數(shù)據(jù)庫的 課程設(shè)計,好多東西都不會。并判斷是否超期以及計算超期天數(shù)和罰款金額,并將其輸入 money 表中,當(dāng)顯示其記錄以后將 money 表中的信息刪除。同時還需要判斷證件是否被掛失,所借的書是否有超期的。 用戶手冊 說明 借書:當(dāng)借一本書時將此的在 bookinfo 表中的標(biāo)記 flag1 置為 1,其他人再借此書時先判斷 flag1 是否為 1,如果為 1 則不可再借此書。這時應(yīng)按原設(shè)計要求重新安排存儲位置、回收垃圾、減少指針鏈等,提高系統(tǒng)性能。 select count(*) into:Il_a from loan where =1。 if Il_a=1 then messageBox(提示信息 ,圖書編號為 +string(long(Is_bookid))+的圖書已還借成功 ) end if = () 查看圖書借閱記錄: string Is_title integer Il_b Is_title=trim() if not = then (Is_title ) else messageBox(數(shù)據(jù)不全 ,請輸入書名 ) return end if select count(*) into:Il_b from loan,bookinfo where = and =:Is_title。 delete from momey where =:Is_bookid 。 end if (Is_bookid) update bookinfo set flag1=0 where =:Is_bookid。 if Il_b =0 then messagebox(信息錯誤 ,此圖書編號的書未被借出! ) return end if if Il_jIs_loandates1 and Il_jIl_k then insert into momey values(:Is_bookid, :Il_e , :Il_m )。 Il_e=abs(DaysAfter(date(datetime(Il_d)),date(datetime(Is_loandates1)))30) Il_m=double(Il_e*) if Il_jIs_loandates1 and Il_jIl_k then messagebox(提示信息 ,所借書在 +string(datetime(Il_j))+ 已超期,罰款+string(double(Il_m))+元,請交罰款! ) end if select into:Il_w from loan where =:Is_bookid 。 if Il_f=0 and Il_v=Is_cert_id then (Is_cert_id,Is_flag) end if : long Is_cert_id,Is_bookid,Il_a,Il_n datetime Is_loandates1,Il_j,Il_k,Il_d long Il_e,Il_h,Il_l,Il_f,Il_b double Il_m integer Il_flag1,Il_w Is_bookid=long() Is_loandates1=datetime(today()) Il_h=0 Il_l=0 if = then messageBox(數(shù)據(jù)不全 ,請輸入圖書編號 ) end if select into:Il_j from loan where =:Is_bookid and :Is_loandates1 and =0。 if Il_b=0 then messagebox(信息錯誤 ,此證件無借書信息! ) return end if select into:Il_v from loan where =:Is_cert_id and =:Is_flag。 if Il_d=2 then messagebox(信息錯誤 ,此證已被掛 失! ) end if select into:Il_a from certificateinfo where =:Is_cert_id。//借書后將本書的 flag1 置 1 = = () 查看借書記錄: long Is_cert_id,Il_d,Il_a,Il_b,Il_v datetime Is_loandates,Is_returndates,Il_j,Il_k integer Is_flag,Il_f Is_loandates=datetime(today()) Is_cert_id=long() //Is_returndates=relativedate(today(),30) select into:Il_j from loan where =:Is_cert_id and :Is_loandates and =0。 select into:Il_f from loan where =:Is_cert_id and =:Is_flag。 if Il_b=1 then messagebox(信息錯誤 ,此書已被借出! ) return end if insert into loan values(:Is_bookid, :Is_cert_id, :Is_loandates, :Is_returndates, :Is_flag)。 if Il_n Is_cert_id then