已閱讀5頁,還剩19頁未讀, 繼續(xù)免費閱讀
版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
數(shù)據(jù)庫原理與應用數(shù)據(jù)庫原理與應用 課程設計課程設計 試題庫及在線考試系統(tǒng)數(shù)據(jù)庫設計試題庫及在線考試系統(tǒng)數(shù)據(jù)庫設計 2010 2011 學年第一學期第學年第一學期第 17 周 周 2010 年 12 月 1 目錄目錄 1 概概述述 1 1 1 項目背景項目背景 1 1 2 系統(tǒng)說明系統(tǒng)說明 1 2 需求分析需求分析 1 2 1 需求分析需求分析 1 2 2 數(shù)據(jù)需求數(shù)據(jù)需求 1 2 3 事物需求事物需求 2 2 4 數(shù)據(jù)字典數(shù)據(jù)字典 2 3 方案圖表設計方案圖表設計 3 3 1 關系模式關系模式 3 3 2 E R 圖圖 3 3 2 1 課程信息實體E R圖 3 3 2 2 考生信息實體E R圖 4 3 2 3 試題信息實體E R圖 4 3 2 4 記錄信息實體E R圖 5 3 2 4 信息實體E R總圖 5 3 3數(shù)據(jù)流程圖 6 3 4 關系圖關系圖 7 4 數(shù)據(jù)數(shù)據(jù)庫庫源源代碼代碼 7 4 1 數(shù)據(jù)庫創(chuàng)建數(shù)據(jù)庫創(chuàng)建 7 4 1 1 創(chuàng)建數(shù)據(jù)庫 7 4 1 2 課程信息表建立 7 4 1 3 創(chuàng)建試題庫表 8 4 1 4 考生表建立 8 4 1 5 考試記錄表建立 8 4 2 數(shù)據(jù)初始化 9 4 2 2 將課程類別加入表course表中 9 4 2 2 將已有的試題加入system examination表中 9 4 2 3 將考生信息加入system examinee表中 10 4 2 4 添加已完成考試的記錄 11 5 結果數(shù)據(jù)處理結果數(shù)據(jù)處理 12 5 1 單表查詢單表查詢 12 5 1 1 表course中查詢 12 5 1 2 表system examination中查詢 13 5 1 3 將考生信息加入system examinee表中結果查詢 13 5 1 4 考試紀錄表examination record結果查詢 14 5 2 待補考處理待補考處理 14 5 2 1 待補考查詢 14 5 3 考考試試操作操作 15 2 5 3 1 查詢還未完成的考試試題 15 5 3 2 查詢已完成的考試試題 16 5 4 考生操作考生操作 16 5 4 1 申請考生考號 16 5 4 2 注銷考生考號 17 5 5 試題查試題查詢詢 17 5 51 查詢所有試題所對應的類別 17 5 5 2 查詢所有計算機網(wǎng)絡的考試 18 5 6 考生狀態(tài)考生狀態(tài) 18 5 6 1 查詢什么人考了什么試 18 5 6 2 查詢蔣偉考了什么試 19 6 結束語結束語 20 7 參考文獻參考文獻 20 1 1 1 概述概述 1 1 項目背景項目背景 隨著綠色生活 綠色工作概念的提出 無紙化辦公已經(jīng)逐漸成為各個企事業(yè)單位的需求 特別是對于學校進行教學的一個必然趨勢 然而 在線考試系統(tǒng)是學校無紙化辦公的一個重要 途徑 此外 試題庫系統(tǒng)更是能最大程度上收集與整理學校的教學資源 方便老師 學生的教 學工作 提高學校工作的效率 因此 必須制定一套合理 有效 規(guī)范和實用的試題庫及在線 考試管理系統(tǒng) 對試題資料進行集中統(tǒng)一的管理 另一方面 IT 產業(yè)和 Internet 獲得了飛速發(fā)展 計算機應用已滲透到了各個領域 引起信 息管理的革命 實現(xiàn)了信息的自動化處理 提高了處理的及時性和正確性 提高學校試題庫管理工作效率 做到信息的規(guī)范管理 科學統(tǒng)計和快速查詢 讓學生和老 師都能感受到在線考試系統(tǒng)帶來的便利 1 2 系統(tǒng)說明系統(tǒng)說明 該試題與在線考試系統(tǒng)主要能實現(xiàn)學生在線考試與瀏覽試題庫的功能 系統(tǒng)能對考生的考 試情況實現(xiàn)一定的查詢 添加與刪除功能 對試題庫進行查詢 添加 刪除操作 在線考試系 統(tǒng)對考生的考試情況進行評分與記錄操作 2 2 需求分析需求分析 2 1 需求分析需求分析 2 2 數(shù)據(jù)需求數(shù)據(jù)需求 圖書館管理信息系統(tǒng)需要完成功能主要有 1 考生基本信息的輸入 包括學號 姓名 年級 專業(yè) 所學課程 2 考生基本信息的查詢 修改 包括學號 姓名 年級 專業(yè) 所學課程等 3 課程信息的輸入 包括課程編號 課程名稱 4 課程信息的查詢 修改 包括課程編號 課程名稱 5 試題庫信息的輸入 包括試題編號 試題所屬課程 試題章節(jié) 上傳日期 6 試題庫信息的查詢 修改 包括試題編號 試題所屬課程 試題章節(jié) 上傳日期等 2 7 已完成考試的信息輸入 包括學號 試題編號 考試完成日期 考試成績 8 已完成考試的信息查詢 修改 包括學號 試題編號 考試完成日期 考試成績 9 待完成的考試輸入 包括學號 試題編號 考試完成期限等 10 待完成的考試查詢 刪除 包括學號 試題編號 考試完成期限等 2 3 事物需求事物需求 1 在考生信息管理部分 要求 a 可以查詢考生信息 b 可以對考生信息進行添加及刪除的操作 2 在試題信息管理部分 要求 a 可以瀏覽試題信息 要求 b 可以對試題信息進行維護 包括添加及刪除的操作 3 在考試信息管理部分 要求 a 可以瀏覽考試信息 b 可以對借閱考試進行維護操作 4 在管理者信息管理部分 要求 a 顯示當前數(shù)據(jù)庫中管理者情況 b 對管理者信息維護操作 2 4 數(shù)據(jù)字典數(shù)據(jù)字典 表 2 1 course 課程信息表 表中列名表中列名數(shù)據(jù)類型數(shù)據(jù)類型可否為空可否為空說明說明 coursenovarcharnot null 主鍵主鍵 課程編號課程編號 coursenvarcharnot null課程名稱課程名稱 表 2 2 system examinee 考生信息表格 表中列名表中列名數(shù)據(jù)類型數(shù)據(jù)類型可否為空可否為空說明說明 examineeidvarcharnot null 主鍵主鍵 考生學號考生學號 examineenamenvarcharnot null考生姓名考生姓名 examineegradeintnot null考生年級考生年級 examineesubjectnvarcharnot null考生專業(yè)考生專業(yè) examineecoursenvarcharnull所學課程所學課程 表 2 3 system examination 試題信息表 表中列名表中列名數(shù)據(jù)類型數(shù)據(jù)類型可否為空可否為空說明說明 examinationidvarcharNot null 主鍵主鍵 試題編號試題編號 coursenonvarcharNot null所屬課程所屬課程 examinationchapternvarcharNot null試題章節(jié)試題章節(jié) 3 examinationdatedatetimenull上傳日期上傳日期 endlinedatetimenull完成期限完成期限 isdonevarcharnull是否完成是否完成 表 2 4 examination record 考試記錄信息表 表中列名表中列名數(shù)據(jù)類型數(shù)據(jù)類型可否為空可否為空說明說明 examineeidvarcharNot null 外主鍵外主鍵 考生學號考生學號 examinationidvarcharNot null 外主鍵外主鍵 試題編號試題編號 recorddatedatetimeNot null考試時間考試時間 recordgoalvarcharNot null考試成績考試成績 3 3 方案圖表設計方案圖表設計 3 1 關系模式關系模式 一 課程信息 課程編號 課程名稱 二 考生 考生學號 考生姓名 考生年級 考生專業(yè) 所學課程 三 試題 試題編號 所屬課程 試題章節(jié) 上傳日期 完成期限 四 考試記錄 考生學號 試題編號 考試時間 考試成績 以上通過關系代數(shù)方法的進行運算得到所需要的結果 在實驗結果中可以看到 3 2 E R 圖圖 根據(jù) 1 所要實現(xiàn)的功能設計 可能建立它們之間的關系 進而實現(xiàn)邏輯結構功能 試題庫及在線考試系統(tǒng)可以劃分的實體有 課程信息實體 考生信息實體 試題信息實體 考 試記錄信息實體 用 E R 圖一一描述這些實體 3 2 1 課程信息實體課程信息實體 E R 圖 圖 課程信息實體課程信息實體 課程編號課程編號課程名稱課程名稱 4 圖 3 1 課程信息實體 E R 圖 3 2 2 考生信息實體考生信息實體 E R 圖 圖 考生信息實體考生信息實體 考生學號考生學號 考生姓名考生姓名 考生年考生年 級級 考生專業(yè)考生專業(yè) 所學課程所學課程 圖 3 2 考生信息實體 E R 圖 3 2 3 試題信息實體試題信息實體 E R 圖 圖 試題實體試題實體 試題編號試題編號 所屬課程所屬課程 試題章節(jié)試題章節(jié) 上傳日期上傳日期 完成期限完成期限 是否完成是否完成 圖 3 3 試題信息實體 E R 圖 5 3 2 4 記錄信息實體記錄信息實體 E R 圖 圖 考生學號考生學號 試題編號試題編號 考試時間考試時間 隔隔 考試記錄信息實體實體考試記錄信息實體實體 考試成績考試成績 隔隔 圖 3 4 考試記錄信息實體 E R 圖 3 2 5 信息實體信息實體 E R 總圖 總圖 信息登記信息登記 考生實體考生實體 試題實體試題實體 課程信息實體課程信息實體 考試考試 待考待考 待考信息實體待考信息實體 考試記錄信息實體考試記錄信息實體 實體實體 圖 3 5 總的信息實體 E R 圖 3 3 數(shù)據(jù)流程圖數(shù)據(jù)流程圖 6 D5 待考信息錄入待考信息錄入 基本信息錄入基本信息錄入 D2 D1 基本信息錄入基本信息錄入 基本信息錄入基本信息錄入 D3 D4 考試信息錄入考試信息錄入 考生信息返回考生信息返回 試題信息返回試題信息返回 圖 3 6 系統(tǒng)的數(shù)據(jù)流程圖 課程信息設置課程信息設置 考生登記考生登記 課程信息管理課程信息管理 試題登記試題登記 讀者信息管理讀者信息管理試題信息管理試題信息管理 考試信息管理考試信息管理 7 3 4 關系圖 關系圖 圖 3 7 數(shù)據(jù)庫存表關系圖 4 4 數(shù)據(jù)庫源代碼數(shù)據(jù)庫源代碼 4 1 數(shù)據(jù)庫建立數(shù)據(jù)庫建立 4 1 1 創(chuàng)建數(shù)據(jù)庫創(chuàng)建數(shù)據(jù)庫 CREATE DATABASE examinationsystem GO USE examinationsystem go 4 1 2 課程信息表建立課程信息表建立 create table course courseno varchar 30 primary key course nvarchar 30 8 go 4 1 3 創(chuàng)建試題庫表創(chuàng)建試題庫表 create table system examination examinationid varchar 20 primary key courseno 30 Not null examinationchapter nvarchar 30 Not null examinationdate datetime endline datetime isdone varchar 10 foreign key courseno references course courseno go 4 1 4 考生表建立考生表建立 create table system examinee examineeid varchar 20 primary key examineename nvarchar 9 not null examineegrade int not null examineesubject nvarchar 10 not null courseno varchar 30 Not null foreign key courseno references course courseno go 4 1 5 考試記錄表建立考試記錄表建立 create table examination record examinationid varchar 20 primary key examineeid varchar 9 recorddate datetime recordgoal int foreign key examineeid references system examinee examineeid foreign key examinationid references system examination examinationid go 9 4 2 數(shù)據(jù)初始化數(shù)據(jù)初始化 4 2 1 將課程類別加入表將課程類別加入表 course 中中 insert into course courseno course values 1 數(shù)據(jù)庫技術 insert into course courseno course values 2 面向對象編程 insert into course courseno course values 3 計算機網(wǎng)絡 insert into course courseno course values 4 網(wǎng)頁制作 insert into course courseno course values 5 信息分析與預測 insert into course courseno course values 6 信息經(jīng)濟學 insert into course courseno course values 7 管理信息系統(tǒng) go 4 2 2 將已有的試題加入將已有的試題加入 system examination 表中表中 insert into system examination examinationid courseno examinationchapter examinationdate endline isdone values 0010101 1 第一章第一節(jié) 2010 10 01 2010 12 31 1 insert into system examination examinationid courseno examinationchapter examinationdate endline values 0010102 1 第一章第二節(jié) 2010 10 01 2010 12 31 1 insert into system examination examinationid courseno examinationchapter examinationdate endline values 0020203 2 第二章第三節(jié) 2010 10 01 2010 12 31 1 insert into system examination examinationid courseno examinationchapter examinationdate endline values 0020301 2 第三章第一節(jié) 2010 10 01 2010 12 31 1 insert into system examination examinationid courseno examinationchapter examinationdate endline values 0030103 3 第一章第三節(jié) 2010 10 01 2010 12 31 1 insert into system examination examinationid courseno 10 examinationchapter examinationdate endline values 0030303 3 第三章第三節(jié) 2010 10 01 2010 12 31 1 insert into system examination examinationid courseno examinationchapter examinationdate endline values 0040202 4 第二章第二節(jié) 2010 10 01 2010 12 31 1 insert into system examination examinationid courseno examinationchapter examinationdate endline values 0050305 5 第三章第五節(jié) 2010 10 01 2010 12 31 1 insert into system examination examinationid courseno examinationchapter examinationdate endline values 0050702 5 第七章第二節(jié) 2010 10 01 2010 12 31 1 insert into system examination examinationid courseno examinationchapter examinationdate endline values 0060402 6 第四章第二節(jié) 2010 10 01 2010 12 31 1 insert into system examination examinationid courseno examinationchapter examinationdate endline values 0060000 6 綜合考試 2010 10 01 2010 12 31 1 insert into system examination examinationid courseno examinationchapter examinationdate endline values 0070000 7 期末測試 2010 10 01 2010 12 31 1 go 4 2 3 將考生信息加入將考生信息加入 system examinee 表中表中 insert into system examinee examineeid examineename examineegrade examineesubject c ourseno values B08650207 陳遠鵬 2008 信息管理 6 insert into system examinee examineeid examineename examineegrade examineesubject c ourseno 11 values B08650131 陳特 2008 信息管理 6 insert into system examinee examineeid examineename examineegrade examineesubject c ourseno values B08310101 趙銘靜 2008 軟件設計 5 insert into system examinee examineeid examineename examineegrade examineesubject c ourseno values B07650231 潘虹 2007 信息管理 3 insert into system examinee examineeid examineename examineegrade examineesubject c ourseno values B08530301 蔣偉 2008 網(wǎng)絡工程 1 insert into system examinee examineeid examineename examineegrade examineesubject c ourseno values B07310132 李葉風 2007 軟件設計 1 go 4 2 4 添加已完成考試的記錄添加已完成考試的記錄 添加已完成考試的記錄 同時將在完成的考試標記置 1 insert into examination record examineeid examinationid recorddate recordgoal values B08310101 0010102 2010 10 27 11 24 54 96 update system examination set isdone 1 where examinationid 0010102 insert into examination record examineeid examinationid recorddate recordgoal values B08530301 0050305 2007 12 27 08 26 51 86 update system examination set isdone 1 where examinationid 0050305 insert into examination record examineeid examinationid recorddate recordgoal values B08650207 0030103 2007 12 27 08 26 51 56 update system examination set isdone 1 where examinationid 0030103 insert into examination record 12 examineeid examinationid recorddate recordgoal values B08310101 0050702 2007 10 21 12 11 51 73 update system examination set isdone 1 where examinationid 0050702 insert into examination record examineeid examinationid recorddate recordgoal values B08650207 0030103 2007 12 28 14 11 51 88 update system examination set isdone 1 where examinationid 0030103 insert into examination record examineeid examinationid recorddate recordgoal values B07310132 0040202 2007 08 28 15 11 31 45 update system examination set isdone 1 where examinationid 0040202 go 5 5 結果數(shù)據(jù)處理結果數(shù)據(jù)處理 5 1 單表查詢單表查詢 5 1 1 表表 course 中查詢中查詢 13 圖 5 1 表 course 中內容 5 1 2 表表 system examination 中查詢中查詢 圖 5 2 表 system examination 中內容 5 1 3 將考生信息加入將考生信息加入 system examinee 表中結果查詢 表中結果查詢 圖 5 3 表 system examinee 中內容 14 5 1 4 考試紀錄表考試紀錄表 examination record 結果查詢結果查詢 圖 5 4 表 examination record 中內容 5 2 待補考處理待補考處理 5 2 1 待補考查詢待補考查詢 現(xiàn)在對考生查詢是否有不及格的考試 select system examinee examineeid 考生學號 system examinee examineename 考生姓名 system examination examinationid 試題編號 system examination examinationchapter 試題章節(jié) examination record recordgoal 考試成績 from examination record system examinee system examination where system examinee examineeid examination record examineeid and system examination examinationid examination record examinationid and examination record recordgoal 60 go 15 圖 5 5 選出有不及格考試的考生 5 3 考試操作考試操作 5 3 1 查詢查詢還未完成的考試試題還未完成的考試試題 select examinationid 試題編號 examinationchapter 試題章節(jié) from system examination where isdone 1 go 圖 5 6 16 5 3 2 查詢已查詢已完成的考試試題完成的考試試題 select examinationid 試題編號 examinationchapter 試題章節(jié) from system examination where isdone 0 go 圖 5 7 5 4 考生操作 5 4 1 申請申請考生考號考生考號 申請考生考號 與學號一致 Insert into system examinee examineeid examineename examineegrade examineesubject c ourseno values B09310103 小華 2009 電子工程 7 查詢 select from system examinee where examineeid B09310103 go 17 圖 5 8 說明 查詢相應的紀錄增加了小華這樣一個考生的紀錄 5 4 2 注銷注銷考生考號考生考號 注銷考生考號 說明 1 在注銷之前執(zhí)行所有的考試過程 就是上面寫到的所述SQL語句 然后執(zhí)行 delete from system examinee where examineeid B09310103 2 小華考生紀錄就被刪除了 同時要刪除和小華考試紀錄的內容 delete from examination record where examineeid B09310103 5 5 試題查詢試題查詢 5 5 1 查詢所有試題所對應的類別查詢所有試題所對應的類別 查詢所有試題所對應的類別 查詢所有試題所對應的類別 select distinct examinationid 試題編號 course 課程類別 from course system examination where course courseno system examination courseno 18 圖 5 9 5 5 2 查詢所有計算機網(wǎng)絡的考試 查詢所有計算機網(wǎng)絡的考試 select distinct examinationid 試題編號 course 課程類別 from course system examination where course courseno system examination courseno and course courseno 3 圖 5 10 5 6 考生狀態(tài)考生狀態(tài) 5 6 1 查
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025版文化遺產保護工程承包合同示范文本2篇
- 2025年度大型商場租賃合同及租賃期限調整規(guī)范
- 二零二五年度新型房產抵押貸款咨詢與評估合同3篇
- 2025版無產權儲藏室買賣及藝術品展示合作協(xié)議3篇
- 2025版商場物業(yè)管理與商業(yè)糾紛調解服務合同3篇
- 上海市奉賢區(qū)2022-2023學年高三上學期一模語文試卷 附答案
- 二零二五年度車輛運輸與汽車后市場服務合同2篇
- 湖州浙江湖州長興縣人民檢察院編外人員招錄3人筆試歷年參考題庫附帶答案詳解
- 溫州浙江溫州平陽縣人民法院招聘編外人員筆試歷年參考題庫附帶答案詳解
- 2025年度教育機構課程開發(fā)與培訓服務合同
- 中國農業(yè)銀行小微企業(yè)信貸業(yè)務貸后管理辦法規(guī)定
- 領導干部的情緒管理教學課件
- 初中英語-Unit2 My dream job(writing)教學課件設計
- 市政道路建設工程竣工驗收質量自評報告
- 優(yōu)秀支行行長推薦材料
- 中國版梅尼埃病診斷指南解讀
- 創(chuàng)業(yè)投資管理知到章節(jié)答案智慧樹2023年武漢科技大學
- 暨南大學《經(jīng)濟學》考博歷年真題詳解(宏觀經(jīng)濟學部分)
- 藥店員工教育培訓資料
- eNSP簡介及操作課件
- 運動技能學習與控制課件第七章運動技能的協(xié)調控制
評論
0/150
提交評論