Web開發(fā)技課程設(shè)計報告.doc_第1頁
Web開發(fā)技課程設(shè)計報告.doc_第2頁
Web開發(fā)技課程設(shè)計報告.doc_第3頁
Web開發(fā)技課程設(shè)計報告.doc_第4頁
Web開發(fā)技課程設(shè)計報告.doc_第5頁
已閱讀5頁,還剩31頁未讀, 繼續(xù)免費閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)

文檔簡介

安安 徽徽 農(nóng)農(nóng) 業(yè)業(yè) 大大 學(xué)學(xué) 課程實踐 設(shè)計 報課程實踐 設(shè)計 報 告告 實踐項目名稱 圖書管理系統(tǒng)的設(shè)計 項目組成人員 院 系 信 年級專業(yè) 0 指 導(dǎo) 教 師 傅 目錄 1 1 課程設(shè)計背景 課程設(shè)計背景 包包括 現(xiàn)狀 括 現(xiàn)狀 研研究目的等 究目的等 3 3 2 2 需求分析需求分析 包括 功包括 功能能分析 操作流程分析分析 操作流程分析等等 3 3 2 12 1 需求分析 3 3 3 設(shè)計與實設(shè)計與實現(xiàn)現(xiàn) 包括 前臺頁 包括 前臺頁面面 數(shù)據(jù)庫 業(yè)務(wù)邏輯等設(shè)計 數(shù)據(jù)庫 業(yè)務(wù)邏輯等設(shè)計 4 4 3 13 1 數(shù)據(jù)庫結(jié)構(gòu)設(shè)計 4 3 1 1 概念結(jié)構(gòu)設(shè)計 4 3 1 2 邏輯結(jié)構(gòu)設(shè)計 7 3 2 1 物理結(jié)構(gòu)設(shè)計 8 3 3 1 系統(tǒng)功能設(shè)計圖書管理模塊功 11 3 4 系統(tǒng)界面設(shè)計與實現(xiàn) 11 3 4 1 系統(tǒng)登錄界面 11 3 1 課程設(shè)計背景課程設(shè)計背景 圖書館信息化管理從最初的對圖書館業(yè)務(wù)管理實行信息化管 理發(fā)展到對圖書館各個業(yè)務(wù)流程和網(wǎng)絡(luò)化管理 并建立大規(guī)模 的以個體文獻目錄聯(lián)機查詢?yōu)橹鞯馁Y源共享系統(tǒng) 而圖書館的 正常運營中總是面對大量的讀者信息 圖書信息及兩者相互作 用產(chǎn)生的借書信息 所以要對讀者資源 讀者資源 借書信息 進行管理 本系統(tǒng)的開發(fā)就是在于提高圖書管理的工作效率 2 需求分析 包括 功能分析 操作流程分析等 需求分析 包括 功能分析 操作流程分析等 2 1需求分析 一般通用的圖書館借閱管理系統(tǒng)包括系統(tǒng)管理 讀者管理 編 目 圖書流通 統(tǒng)計 查詢等功能 比較先進的能夠在一個界 面下實現(xiàn)圖書 音像 期刊的管理 設(shè)置假期 設(shè)置暫離鎖 提高安全性 暫停某些讀者的借閱權(quán) 導(dǎo)入導(dǎo)出讀者 交 換MARC數(shù)據(jù) 升級輔助編碼庫等 此外隨著Internet應(yīng)用的 發(fā)展 一個完善的系統(tǒng)還應(yīng)該提供無縫接入Internet的功能 通過IE瀏覽器讓讀者使用借閱資料查詢 更換密碼 預(yù)約 資 料檢索等功能 有些系統(tǒng)還能提供讀者自助服務(wù) 可以開放一 些客戶機讓讀者自行管理密碼 查詢自己的借閱史 預(yù)約資料 檢索資料等 4 在構(gòu)造系統(tǒng)時 首先從需求出發(fā)構(gòu)造數(shù)據(jù)庫表 然后再由數(shù)據(jù) 庫結(jié)合需求劃分系統(tǒng)功能模塊 這樣 就把一個大的系統(tǒng)分解 成了幾個小系統(tǒng) 這里把系統(tǒng)的層次劃分為了兩個部分 一個 是一般用戶態(tài) 即圖書有服務(wù)子系統(tǒng) 另一個是管理員界面 提供圖書的管理和維護功能 對于不同子系統(tǒng)之間的功換 采 用了登錄功能和用戶注銷功能 系統(tǒng)劃分了子系統(tǒng)后 下一步的工作是繼續(xù)劃分子系統(tǒng)的小 模塊 先考慮在進入子系統(tǒng)時應(yīng)該做什么 進入系統(tǒng)之后又應(yīng) 該做什么 提供那些服務(wù)等 例如 對于圖書信息服務(wù)子系統(tǒng) 在用戶進入時首先得調(diào)用相關(guān)數(shù)據(jù)庫表 找出用戶的圖書借閱 情況 進入系統(tǒng)后 子系統(tǒng)得提供圖書查詢 圖書借閱和還書 功能 另外 針對本系統(tǒng)的特殊情況 同時也考慮系統(tǒng)的可移 植性 在系統(tǒng)中增加了數(shù)據(jù)庫路徑的維護部分 但由于本人技術(shù)有限 下面只做了部分設(shè)計但由于本人技術(shù)有限 下面只做了部分設(shè)計 3 設(shè)計與實現(xiàn) 包括 前臺頁面 數(shù)據(jù)庫 業(yè)務(wù)邏輯等設(shè)計 設(shè)計與實現(xiàn) 包括 前臺頁面 數(shù)據(jù)庫 業(yè)務(wù)邏輯等設(shè)計 3 1數(shù)據(jù)庫結(jié)構(gòu)設(shè)計 3 1 1 概念結(jié)構(gòu)設(shè)計 E R圖 5 概念結(jié)構(gòu)設(shè)計是將分析得到的用戶需求抽象為概念模型的 過程 即在需求分析的基礎(chǔ)上 設(shè)計出能夠滿足用戶需求的各 種實體以及它們之間的相互關(guān)系的模型 這樣才能更好地 更 準(zhǔn)確地用某一DBMS實現(xiàn)這些需求 它是整個數(shù)據(jù)庫設(shè)計的關(guān) 鍵 概念結(jié)構(gòu)的主要特點是能真實 充分地反映現(xiàn)實世界 易 于理解 易于更改 易于向關(guān)系 網(wǎng)狀 層次等各種數(shù)據(jù)模型 轉(zhuǎn)換 描述概念模型的有力工具是E R模型 Er 圖 圖 管理 管理 管理 管理 管理 管理員 圖書類型 書架 圖書 圖書館信 息 借閱信息 屬于 屬于 6 部分實體部分實體 ER 圖 圖 圖書 書名 作者 書類 書架號 價格 管理員 管理員號 管理員名 密碼 圖書編 號 借閱次數(shù) 7 3 1 2 邏輯結(jié)構(gòu)設(shè)計 邏輯結(jié)構(gòu)設(shè)計的任務(wù)就是把概念結(jié)構(gòu)設(shè)計階段設(shè)計好的基本E R圖轉(zhuǎn)換為與選用DBMS產(chǎn)品所支持的數(shù)據(jù)模型相符合的邏輯 結(jié)構(gòu) 設(shè)計邏輯結(jié)構(gòu)時一般要分三步進行 首先是將概念結(jié)構(gòu) 轉(zhuǎn)換為一般的關(guān)系 網(wǎng)狀 層次模型 其次是將轉(zhuǎn)換來的關(guān)系 網(wǎng)狀 層次模型向特定DBMS支持下的數(shù)據(jù)模型轉(zhuǎn)換 最后是 對數(shù)據(jù)模型進行優(yōu)化 基于B S的簡易圖書借閱管理系統(tǒng)采用的是將E R圖向關(guān)系數(shù) 據(jù)模型轉(zhuǎn)換 以下是由概念模型向邏輯模型轉(zhuǎn)化的關(guān)系模式 管理員 管理員編號 管理員名稱 管理員密碼 圖書 圖書編碼 圖書名稱 圖書類別 書架 作者 價格 借閱次數(shù) 8 3 2 1物理結(jié)構(gòu)設(shè)計 數(shù)據(jù)庫的物理結(jié)構(gòu)設(shè)計是對于給定的邏輯數(shù)據(jù)模型 選取一個 最合適應(yīng)用環(huán)境的物理結(jié)構(gòu) 數(shù)據(jù)庫的物理結(jié)構(gòu)指的是數(shù)據(jù)庫 在物理設(shè)備上的存儲結(jié)構(gòu)與存取方法 它依賴于給定的計算機 系統(tǒng) 表2 2管理員信息表 new userlist 字段名注釋類型長度允許空默認(rèn)值 userId 管理員 編號 int4 自動增長 1 1 userName 管理員 名稱 varch ar 50Null userPwd 管理員 密碼 varch ar 50Null 9 表2 3圖書信息表 new booklist 字段名 注釋 類 型 長度 允 許空 默認(rèn)值 bookid圖書編 碼 varc har 50 bookNa me 圖書名 稱 varc har 50 null bookTyp e 圖書類 別 int 4 null bookcase書架int 100 null auother作者varc har 80 null price價格mon ey 8null borrowS um 借閱次 數(shù) int 4 null 10 數(shù)據(jù)庫表 11 3 3 1系統(tǒng)功能設(shè)計圖書管理模塊功能 時間技術(shù)有限目前只有 此功能 圖書類型管理 是對圖書進行分類管理 對圖書類型的添 加 刪除 修改等功能 圖書信息管理 管理員對圖書信息的詳細錄入 修改圖書 信息和刪除圖書信息等功能 3 4系統(tǒng)界面設(shè)計與實現(xiàn) 3 4 1系統(tǒng)登錄界面 系統(tǒng)首頁 同時也是登錄界面 在此界面中 管理可以根 據(jù)自身情況登錄到系統(tǒng)中 管理員登錄界面如下圖所示 12 相關(guān)代碼 用戶登陸界面 13 管理員登陸 管理員姓名 管理員密碼 14 用戶身份驗證 JSPdl 0 顯示圖書列表 圖書列表 17 圖書編號 書名 作者 書類 書架號 價格 借閱次數(shù) new booklistBean records conn getAllRecords if records null for int i 0 i records length i out println out println records i getbookID out println records i getbookName out println records i getauother out println records i getbookType out println records i getbookCase out println records i getprice out println records i getborrowSum out println 18 更多操作 添加圖書 返回 刪除圖書 管理員添加圖書記錄 19 相關(guān)代碼 JSPdl 3 添加圖書記錄 20 添加新記錄 圖書編號 書名 作者 書類 書架號 21 價格 借閱次數(shù) if book getbookID 0 22 JSPdl 4 刪除圖書記錄 圖書列表 圖書編號 書名 作者 書類 書架號 價格 23 借閱次數(shù) 選擇 new booklistBean records conn getAllRecords if records null for int i 0 i records length i out println out println records i getbookID out println records i getbookName out println records i getauother out println records i getbookType out println records i getbookCase out println records i getprice out println records i getborrowSum input type checkbox name value out println 24 String check new String records length for int i 0 i check length i check i request getParameter check i if check i null check i if check i equals i if conn deleteRecord records i out println 刪除成功 response setHeader refresh 1 與系統(tǒng)相關(guān)的bean代碼 New booklistBean 25 package beans public class new booklistBean private String bookID 表示書編號 private String bookName 書名 private String auother 作者名 private int bookType 書類 private int bookCase 書架號 private int price 書價 private int borrowSum 書被借的次數(shù) public String getbookID return bookID public void setbookID String bookID this bookID bookID public String getbookName return bookName public void setbookName String bookName this bookName bookName public String getauother return auother 26 public void setauother String auother this auother auother public int getbookType return bookType public void setbookType int bookType this bookType bookType public int getbookCase return bookCase public void setbookCase int bookCase this bookCase bookCase public int getprice return price public void setprice int price this price price public int getborrowSum return borrowSum public void setborrowSum int borrowSum 27 this borrowSum borrowSum ConnBean package beans import java sql 導(dǎo)入jdbc public class ConnBean private String driver sun jdbc odbc JdbcOdbcDriver 默認(rèn)驅(qū)動程序為jdbc odbc驅(qū)動 private String jdbcurl jdbc odbc jdbcurl private String database new booklist 數(shù)據(jù)庫或數(shù)據(jù)源 private String userName root 用戶名 private String password 123456 密碼 private Connection connection null public Connection getConnection try Class forName driver 注冊驅(qū)動程序 connection DriverManager getConnection jdbc odbc new booklist 建立連接 catch ClassNotFoundException e1 e1 printStackTrace catch SQLException e2 e2 printStackTrace 28 return connection public void closeConnection Connection connection 關(guān)閉連接 try if connection null connection close connection null catch SQLException e3 e3 printStackTrace public void closePstmt PreparedStatement pstmt 關(guān)閉執(zhí)行語句 try if pstmt null pstmt close pstmt null catch SQLException e e printStackTrace public void closeResultSet ResultSet rs 關(guān)閉結(jié)果集語句 try if rs null rs close 29 rs null catch SQLException e e printStackTrace public String getDriver 獲取驅(qū)動程序 return driver public void setDriver String driver this driver driver public String getDatabase return database public void setDatabase String database this database database public String getPassword return password public void setPassword String password this password password public String getJdbcurl return jdbcurl 30 public void setJdbcurl String url this jdbcurl url public String getUserName return userName public void setUserName String userName this userName userName New libraryBean package beans import java sql Connection import java sql PreparedStatement import java sql ResultSet import java sql SQLException 31 import java util ArrayList import java util Collection public class new libraryDBean extends ConnBean private Connection connection null public new booklistBean getAllRecords 獲取所有記錄 ResultSet rs null PreparedStatement pstmt null Collection list new ArrayList try connection getConnection pstmt connection prepareStatement select from new booklist 數(shù)據(jù) 表new booklist rs pstmt executeQuery while rs next new booklistBean new booklist new new booklistBean new booklist setbookID rs getString 1 new booklist setbookName rs getString 2 new booklist setauother rs getString 3 new booklist setbookType rs getInt 4 new booklist setbookCase rs getInt 5 new booklist setprice rs getInt 6 new booklist setborrowSum rs getInt 7 list add new booklist 32 catch SQLException e e printStackTrace finally closePstmt pstmt closeConnection connection new booklistBean records new booklistBean list toArray new new booklistBean 0 return records public new booklistBean queryARecord String sqlStr 查詢一條記錄 ResultSet rs null PreparedStatement pstmt null new booklistBean new booklist new new booklistBean try connection getConnection pstmt connection prepareStatement sqlStr rs pstmt executeQuery if rs next new booklist setbookID rs getString 1 new booklist setbookName rs getString 2 new booklist setauother rs getString 3 new booklist setbookType rs getInt 4 new booklist setbookCase rs getInt 5 new booklist setprice rs getInt 6 33 new booklist setborrowSum rs getInt 7 catch SQLException e e printStackTrace finally closeResultSet rs closePstmt pstmt closeConnection connection return new booklist public boolean insertRecord new booklistBean record 插入記錄 PreparedStatement pstmt null String insStr insert into new booklist values if record null return false try connection getConnection pstmt connection prepareStatement insStr pstmt setString 1 record getbookID pstmt setString 2 record getbookName pstmt setString 3 record getauother pstmt setInt 4 record getbookType pstmt setInt 5 record getbookCase pstmt setInt 6 record getprice pstmt setInt 7 record getborrowSum 34 pstmt execute catch SQLException e e printStackTrace finally closePstmt pstmt closeConnection connection return true public boolean deleteRecord new booklistBean record 刪除記錄 Prepared

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。

評論

0/150

提交評論