




已閱讀5頁,還剩11頁未讀, 繼續(xù)免費閱讀
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認領
文檔簡介
無憂無慮畢設網(wǎng) ():畢業(yè)設計源碼下載 畢業(yè)設計源碼下載: 本文配套程序下載地址 : 無憂無慮畢設網(wǎng) ()-大學生畢業(yè)設計站 ,免費畢業(yè)設計論文 ,無憂無慮畢設網(wǎng) 大學生畢業(yè)設計 ,出售各類畢業(yè)設計源碼 ,論文 ,程序源碼 ,網(wǎng)站源碼 ,免費視頻教程 ,我們將竭誠為您服務! 聯(lián)機考試系統(tǒng) 設 計 文 檔 計科 0213: 楊麟兒 02282055 辛松 02282051 楊萌 02282053 楊琳 02282052 生物 0202: 吳軍 無憂無慮畢設網(wǎng) ():畢業(yè)設計源碼下載 畢業(yè)設計源碼下載: 目 錄 一問題定義 二需求分析 2.1 系統(tǒng)目標 2.2 可行性分析 2.2.1 傳統(tǒng)二層結(jié)構(gòu) 2.2.2 三層數(shù)據(jù)庫應用結(jié)構(gòu) 2.2.3 多層分布式數(shù)據(jù)庫系統(tǒng) 2.3 本系統(tǒng)的方案選擇 2.4 本系統(tǒng)開發(fā)環(huán)境 三數(shù)據(jù)庫的分析設計 3.1 數(shù)據(jù)庫模型 3.2 各數(shù)據(jù)表簡介 四系統(tǒng)的實現(xiàn) 4.1 系統(tǒng)核心模塊代碼 4.2 程序運行截圖 五系統(tǒng)的不足與展望 六體會 七組員分工 無憂無慮畢設網(wǎng) ():畢業(yè)設計源碼下載 畢業(yè)設計源碼下載: 1.問題定義 現(xiàn)在網(wǎng)絡正在改變著傳統(tǒng)的教育方式,網(wǎng)絡教育也越來越多,就算是傳統(tǒng)的教育方式下,把考試搬到網(wǎng)絡上也是一種趨勢。考試的無紙化網(wǎng)絡化不僅能有效減少老師的工作量,很好的利用計算機的優(yōu)勢, 提高工作效率,也能使考試更加公平、公正。所以就一定要構(gòu)建一個性能良好安全可靠的可以滿足大量學生同時使用的網(wǎng)絡考試系統(tǒng)。 本考試系統(tǒng)主要功能如下: 1. 學生可以在網(wǎng)上進行考試,考試結(jié)束后由計算機批改試題給出分數(shù),并記錄成績。 2. 學生在還可以在網(wǎng)上查詢自己的考試成績,查看自己的考試情況,修改密碼等個人資料。 3. 老師可以在網(wǎng)上建立并維護題庫,按不同方式組卷,還可以查看學生各次的考試情況。 4. 管理員可以在網(wǎng)上建立學生、老師等用戶。 2.需求分析 2.1 系統(tǒng)目標 本考試系統(tǒng)應該能滿足學校幾千學生在任何地方、任何時間都能參加考試 。本系統(tǒng)要讓學生、老師和管理員在網(wǎng)絡上可以維護自己的個人資料。學生也可以在網(wǎng)絡上通過本系統(tǒng)查詢自己考試的成績;老師能通過網(wǎng)絡生成試卷;管理員在網(wǎng)絡上通過本系統(tǒng)增加學生和老師;試卷的試題可以有教師自己從題庫中抽取,也可由計算機按照一定的算法隨機從題庫抽取,這就增加的出題的科學性和公平性。 2.2 可行性分析 2.2.1 傳統(tǒng)二層結(jié)構(gòu) 傳統(tǒng)的二層式程序,也就是客戶 /服務器( Client/Server)結(jié)構(gòu),這種程序相對簡單、清楚、開發(fā)容易,其結(jié)構(gòu)如圖 1??蛻魴C都通過網(wǎng)絡連接到同一個數(shù)據(jù)庫上,不過這樣結(jié)構(gòu)問題很多,最 主要的就是性能較差維護困難已經(jīng)不適應在因特網(wǎng)( Internet)上使用。數(shù)據(jù)同一性和完整性難以控制。同時由于每一個客戶機都必須安裝特定的軟件,且這種客戶端軟件體積還比較大,用戶使用起來非常不方便,所以目前已經(jīng)面臨淘汰。不過這樣的系統(tǒng)開發(fā)比較簡單,對開發(fā)人員的技術(shù)要求也不高,在內(nèi)部局域網(wǎng)上使用還有一定的市場。 無憂無慮畢設網(wǎng) ():畢業(yè)設計源碼下載 畢業(yè)設計源碼下載: (圖 1) 2.2.2 三層數(shù)據(jù)庫應用結(jié)構(gòu) 三層結(jié)構(gòu)是目前用得最多的,這種結(jié)構(gòu)比傳統(tǒng)的 C/S結(jié)構(gòu)增加了一個應用程序服務器,應用程序服務器包 括了統(tǒng)一的界面、業(yè)務規(guī)則和數(shù)據(jù)處理邏輯等等,這樣客戶端程序就可以做得比較小,也就是常說的瘦客戶,更由于業(yè)務規(guī)則和數(shù)據(jù)處理邏輯的集中在服務器上統(tǒng)一管理,客戶端無須進行復雜的計算,也不會因為錯誤的操作而影響到其他的用戶,所以他的可靠性、穩(wěn)定性和效率都比較好。當然開發(fā)這樣的系統(tǒng)在技術(shù)上和成本上要求就要多一些。(其結(jié)構(gòu)如圖 2) 圖 2 2.2.3 多層分布式數(shù)據(jù)庫系統(tǒng) 近年來隨著因特網(wǎng)的快速發(fā)展,許多企業(yè)都開始上網(wǎng),因此基于網(wǎng)絡的營銷系統(tǒng)、MIS 系統(tǒng)、 ERP 系統(tǒng)都快速發(fā)展起來了,這個時候僅僅三層的應用程序已經(jīng)不能滿足實際需求了。因此又發(fā)展出來了多層分布式的數(shù)據(jù)庫系統(tǒng)。在多層分布式系統(tǒng)中,人們把中間的應用服務器再拆分為很多比較小的系統(tǒng),均勻分散到多臺計算機中處理,這樣就能得到更好的性能并且降低了程序復雜度。在多層分布式數(shù)據(jù)庫系統(tǒng)中必須要有一個所謂的中間件來支持和管理分散的業(yè)務處理程序。 在 Windows 平臺下微軟公司推出了的 Windows DNA( Distributed interNet Application Architecture,分布式網(wǎng)絡應用結(jié)構(gòu) )策略。把 COM+作為 Windows DNA 策略中的中間件。在 Windows2000 以上操作系統(tǒng)中, COM+成為了系統(tǒng)的一部分。 COM+為中間層提供了負載平衡、對象池( Object Pooling)、事務特性等一系列的強力支持,并且在 COM+中工作的程序受到操作系統(tǒng)的保護,從而最大的保證了系統(tǒng)的安全、穩(wěn)定和高效。當然開發(fā)這樣的無憂無慮畢設網(wǎng) ():畢業(yè)設計源碼下載 畢業(yè)設計源碼下載: 系統(tǒng)要求開發(fā)人員必須掌握 COM( Component Object Model,組件對象模型)和 COM+技術(shù),開發(fā)難度和成本更大了。 圖 3 2.3 本系統(tǒng)的方案選擇 本系統(tǒng)一般應用于局域網(wǎng),并且要滿足一多個學生考試的需要,因此本系統(tǒng) 采用多層分步式數(shù)據(jù)庫系統(tǒng)進行開發(fā),保證了數(shù)據(jù)層和應用層的相對獨立,系統(tǒng)能夠自動適應多種數(shù)據(jù)庫,比如 SQL Server 和 ORACLE等數(shù)據(jù)庫。 2.4 本系統(tǒng)開發(fā)環(huán)境 前端開發(fā)工具: Borland Delphi 7 數(shù)據(jù)庫服務器: Microsoft SQL Server 2000 輔助工具 : Microsoft Visio , Rational Rose 無憂無慮畢設網(wǎng) ():畢業(yè)設計源碼下載 畢業(yè)設計源碼下載: 3.數(shù)據(jù)庫的分析設計 3.1 數(shù)據(jù)庫模型 t b _ t e a c h e rP K t h _ i dt h _ u s e r n a m et h _ p wt h _ n a m et h _ n o t et b _ s t u d e n tP K s d _ i ds d _ u s e r n a m es d _ p ws d _ p e r m i ts d _ n a m es d _ c o n d i t i o ns d _ l o g i n _ c o u n t e rs d _ n o t et b _ c o u r s eP K c r _ i dc r _ n a m ec r _ d e st b _ s e l e c t i o n _ s u b j e c tP K s l s _ i ds l s _ d e sF K 1 s l s _ k p _ i ds l s _ v a l u es l s _ d i f f i c u l t yF K 2 s l s _ s l n _ i dt b _ s e l e c t i o n _ a n s w e rP K s l n _ i ds l n _ d e sF K 1 s l n _ s l s _ i dt b _ f i l l i n g _ s u b j e c tP K f l s _ i df l s _ d e sF K 1 f l s _ k p _ i df l s _ v a l u ef l s _ d i f f i c u l t yf l s _ k e yt b _ j u d g e m e n t _ s u b j e c tP K j d s _ i dj d s _ d e sF K 1 j d s _ k p _ i dj d s _ d i f f i c u l t yj d s _ v a l u ej d s _ r i g h tt b _ t e s t _ p a p e rP K t p _ i dt p _ d e sF K 1 t p _ t h _ i dF K 2 t p _ c r _ i dt p _ v a l u et p _ d i f f i c u l t yt p _ t i m et b _ t e s t _ p a p e r _ d e t a i lP K t p d _ i dt p d _ t y p eF K 1 t p d _ t p _ i dt p d _ s u b j e c t _ i dt b _ t e s t _ r e s u l tP K t r _ i dF K 1 t r _ t p _ i dF K 2 t r _ s d _ i dt r _ g r a d et b _ s t u d e n t _ a n s w e rP K s a _ i dF K 1 s a _ t p _ i dF K 3 s a _ s d _ i dF K 2 s a _ t p d _ i dF K 4 s a _ s l n _ i ds a _ f l s _ d e ss a _ j d s _ a n s w e rs a _ t y p et b _ k n o w l e d g e _ p o i n tP K k p _ i dk p _ d e sF K 1 k p _ c r _ i d 無憂無慮畢設網(wǎng) ():畢業(yè)設計源碼下載 畢業(yè)設計源碼下載: 3.2 各數(shù)據(jù)表簡介: tb_knowledge_point( kp ) 知識點表 kp_id 知識點主鍵 kp_des 知識點描述 kp_cr_id 所屬學科 id tb_student_answer( sa ) 答卷表 sa_id 答案主鍵 sa_tp_id 對應試卷 sa_sd_id 學生 id sa_tpd_id 對應題目(在明細表上) sa_sln_id 如果是選擇題,答案 sa_fls_des 如果是填空題,答案 sa_ids_answer 如果是判斷題,答案 sa_type 題目類型( 1 選擇題, 2 填空題, 3 判斷題) tb_test_result( tr ) 考試成績 tr_id 試卷成績 id tr_tp_id 對應試卷 id tr_sd_id 對應學生 id tr_grade 學生成績 Tb_test_paper_detail( tpd ) 試卷明細表 tpd_id 試卷明細主鍵 tpd_type 題目類型( 選擇題,填空題,判斷題) tpd_tp_id 對應的試卷頭 tpd_subject_id 對應選擇題表、填空題表、判斷體表 id tb_test_paper( tp ) 試卷表 tp_id 試卷主鍵 tp_des 試卷描述 tp_th_id 出題老師 id tp_cr_id 多屬學科 tp_value 試卷分值 tp_difficulty 試卷難度 tp_time 考試時間 無憂無慮畢設網(wǎng) ():畢業(yè)設計源碼下載 畢業(yè)設計源碼下載: tb_judgement_subject( jds ) 判斷題表 jds_id 判斷題主鍵 jds_des 判斷題題目 jds_kp_id 所屬知識點 jds_difficult 難度 jds_value 分值 jds_right 是否正確 tb_filling_subject( fls ) 填空題表 fls_id 填空題主鍵 fls_des 填空題題目 fls_kp_id 所屬知識點 fls_value 分值 fls_difficulty 難度 fls_key 填空題答案 tb_selection_answer( sln ) 選擇題答案表 sln_id 選擇題答案主鍵 sln_des 答案描述 Sln_sls_id 對應選擇題 tb_selection_subject( sls ) 選擇題表 sls_id 選擇題主鍵 sls_des 選擇題題目 sls_kp_id 所屬知識點 sls_value 分值 sls_difficult 難度 sls_sln_id 正確答案 tb_course( cr ) 學科表 cr_id 學科主鍵 cr_name 學科名 cr_des 學科描述 tb_student( sd ) 學生表 sd_id 學生主鍵 sd_username 學生登陸用戶名 sd_pw 密碼 sd_permit 是否允許考試 sd_name 姓名 sd_condition 目前狀態(tài) sd_login_counter 登陸次數(shù) sd_note 備注 無憂無慮畢設網(wǎng) ():畢業(yè)設計源碼下載 畢業(yè)設計源碼下載: tb_teacher( th ) 教師表 th_id 教師主鍵 th_username 教師登陸名字 th_pw 登陸密碼 th_name 教師真實名字 th_note 備注 4.系統(tǒng)實現(xiàn) 4.1 系統(tǒng)核心模塊代碼: 因為本系統(tǒng)源代碼比較多,在這里就僅僅列出比較重要的 核心代碼。 4.1.1 自動組卷過程(截圖如圖“自動組卷”所示) 由于我們設計的數(shù)據(jù)庫結(jié)構(gòu)比較復雜 ,其中涉及很多張表的查找,插入,刪除操作。如果我們通過應用服務器向數(shù)據(jù)庫提交 SQL操作,勢必會造成延時,導致系統(tǒng)變慢。因此,我們采用在數(shù)據(jù)庫端定義一個 存儲過程,這樣就增強了系統(tǒng)的可復用性和減少網(wǎng)絡通信流量。 1) 定義一張臨時表 -create table tn_makeTP_tmp(id int identity not null, key int not null, -value_id int not null, spid int not null, def_value real) 2)-自動組卷存儲過程 -傳入教師 teacherId, 試卷名稱 des,試卷總分 totalVal, 選擇題分數(shù) seleVal,填空題分數(shù) fillVal,判斷題分數(shù) judgeVa,課程 crId. create procedure pd_make_testPage teacherId int, des varchar(100), totalVal int, seleVal int, fillVal int, judgeVal int, crId int, tpId int out as -新的事務 begin tran; -新的試卷 id insert into tb_test_paper(tp_des, tp_th_id, tp_cr_id, tp_value) values(des, teacherId, crId, totalVal); set tpId = identity; -用戶進程 ID declare spid int; set spid = spid; 無憂無慮畢設網(wǎng) ():畢業(yè)設計源碼下載 畢業(yè)設計源碼下載: -循環(huán)遍歷變量 declare i int; set i = 0; -選擇題處理 -選擇題號和選擇題分值 declare id int, value real; -選擇題游標 declare cur_select cursor local for select sls_id, sls_value from tb_selection_subject where sls_kp_id in (select kp_id from tb_knowledge_point where kp_cr_id = crId); open cur_select; -插入臨時表 fetch next from cur_select into id, value; while fetch_status = 0 begin insert into tb_makeTP_tmp(key, value_id, def_value, spid) values(i, id, value, spid); set i = i + 1; fetch next from cur_select into id, value; end -關閉游標 close cur_select; set i = i - 1; -隨機數(shù) declare re int; -題目的數(shù)量 declare j int, num int; set num = round(seleVal / value, 0); set j = 0; declare tmp real; -利用隨機數(shù)插入選擇題號 while j num begin 無憂無慮畢設網(wǎng) ():畢業(yè)設計源碼下載 畢業(yè)設計源碼下載: -生成 0i 之間的隨機數(shù) set re = round(rand() * i, 0) print re; print j; -根據(jù)隨機數(shù)查找記錄 set id = (select value_id from tb_makeTP_tmp where key = re and spid = spid); -把該題插到明細表中 insert into tb_test_paper_detail(tpd_type, tpd_tp_id, tpd_subject_id) values(1, tpId, id); -繼續(xù)下一道題 set j = j + 1; end -清空臨時表 delete from tb_makeTP_tmp where spid = spid; -判斷題處理 set i = 0; declare cur_jud cursor local for select jds_id, jds_value from tb_judgement_subject where jds_kp_id in (select kp_id from tb_knowledge_point where kp_cr_id = crId); open cur_jud; -插入臨時表 fetch next from cur_jud into id, value; while fetch_status = 0 begin insert into tb_makeTP_tmp(key, value_id, def_value, spid) values(i, id, value, spid); set i = i + 1; fetch next from cur_jud into id, value; end -關閉游標 close cur_jud; set i = i - 1; -判斷題目的數(shù)量 set num = round(judgeVal / value, 0); set j = 0; 無憂無慮畢設網(wǎng) ():畢業(yè)設計源碼下載 畢業(yè)設計源碼下載: while j num begin set re = round(rand() * i, 0); set id = (select value_id from tb_makeTP_tmp where key = re and spid = spid); insert into tb_test_paper_detail(tpd_type, tpd_tp_id, tpd_subject_id) values(3, tpId, id); set j = j + 1; end delete from tb_makeTP_tmp where spid = spid; -填空題處理 set i = 0; declare cur_fill cursor local for select fls_id, fls_value from tb_filling_subject where fls_kp_id in (select kp_id from tb_knowledge_point where kp_cr_id = crId); open cur_fill; -插入臨時表 fetch next from cur_fill into id, value; while fetch_status = 0 begin insert into tb_makeTP_tmp(key, value_id, def_value, spid) values(i, id, value, spid); set i = i + 1; fetch next from cur_fill into id, value; end -關閉游標 close cur_fill; set i = i - 1; -判斷題目的數(shù)量 set num = round(fillVal / value, 0); set j = 0; while j num begin set re = round(rand() * i, 0); set id = (select value_id from tb_makeTP_tmp where key = re and spid = spid); insert into tb_test_paper_detail(tpd_type, tpd_tp_id, tpd_subject_id) values(2, tpId, id); set j = j + 1; end 無憂無慮畢設網(wǎng) ():畢業(yè)設計源碼下載 畢業(yè)設計源碼下載: delete from tb_makeTP_tmp where spid = spid; -結(jié)束所有處理 Commit 4.1.2 試卷管理 (截圖如圖“試卷管理” 所示) 由于本模塊涉及較多表的操作,得別介紹。主要功能是通過選擇科目,和試卷名稱,來顯示相應的試題。再作添加,刪除,查詢等操作。 if combobox3.Text=選擇題 then begin ADOQuery_Subject.Close; ADOQuery_Subject.SQL.Clear; ADOQuery_Subject.SQL.Add(select * from (select * from tb_test_paper_detail where (tpd_tp_id =(select tp_id from tb_test_paper where tp_des =:tp_des and tp_cr_id =(select cr_id from tb_course where cr_name=:cr_name) and tpd_type = 1) ); ADOQuery_Subject.SQL.Add(as tb_test_paper_detail inner join tb_selection_subject on tpd_subject_id = sls_id); ADOQuery_Subject.SQL.Add(inner join tb_selection_answer on sls_id = sln_sls_id order by tpd_id); ADOQuery_Subject.Parameters.ParamByName(tp_des).Value:=combobox2.Text; ADOQuery_Subject.Parameters.ParamByName(cr_name).Value:=combobox1.Text; ADOQuery_Subject.Open; end; if combobox3.Text=填空題 then begin ADOQuery_Subject.Close; ADOQuery_Subject.SQL.Clear; ADOQuery_Subject.SQL.Add(select * from (select * from tb_test_paper_detail where tpd_tp_id =(select tp_id from tb_test_paper where tp_des =:tp_des and tp_cr_id =(select cr_id from tb_course where cr_name=:cr_name) and tpd_type = 2) ); ADOQuery_Subject.SQL.Add(as tb_test_paper_detail inner join tb_filling_subject on tpd_subject_id = fls_id); ADOQuery_Subject.SQL.Add(inner join tb_selection_answer on sls_id = sln_sls_id order by tpd_id); ADOQuery_Subject.Parameters.ParamByName(tp_des).Value:=combobox2.Text; ADOQuery_Subject.Parameters.ParamByName(cr_name).Value:=combobox1.Text; ADOQuery_Subject.Open; ADOQuery_Subject.First; while (not ADOQuery_Subject.Eof) do begin ADOQuery_Subject.Next; end; 無憂無慮畢設網(wǎng) ():畢業(yè)設計源碼下載 畢業(yè)設計源碼下載: end; if combobox3.Text=判斷題 then begin ADOQuery_Subject.Close; ADOQuery_Subject.SQL.Clear; ADOQuery_Subject.SQ
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負責。
- 6. 下載文件中如有侵權(quán)或不適當內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 醫(yī)療健康數(shù)據(jù)隱私保護協(xié)議(GDPRCCPA合規(guī))
- 影視項目場次牌租賃及配套服務合同
- 網(wǎng)絡文學作品有聲化改編權(quán)許可及衍生品授權(quán)與推廣合同
- 校招員工面試題目及答案
- 工業(yè)模具加工質(zhì)量驗收及后續(xù)維護合同補充
- 創(chuàng)業(yè)項目法律風險防范顧問協(xié)議
- 造口護理知識
- 大數(shù)據(jù)分析驅(qū)動的物流倉儲運營優(yōu)化合同
- 婚后電子產(chǎn)品共有權(quán)分割及維護協(xié)議
- 新能源企業(yè)ESG債券發(fā)行風險防控法律支持協(xié)議
- 氯堿工藝培訓課件
- 2025年新音樂節(jié)明星藝人歌手演出場費報價單
- (一模)青島市2025年高三年級第一次適應性檢測英語試卷(含標準答案)+聽力材料
- 70歲老年人三力測試能力考試題庫附答案
- 交通中國知到智慧樹章節(jié)測試課后答案2024年秋上海工程技術(shù)大學
- 2025年《中央一號文件》參考試題庫資料100題及答案(含單選、多選、判斷題)
- GB/T 28185-2025城鎮(zhèn)供熱用換熱機組
- 川教版(2019)小學信息技術(shù)四年級下冊 第二單元第3節(jié)《圖文并茂》教學設計及反思
- 烹飪原料知識試題庫(附參考答案)
- 主動剎車防撞系統(tǒng)說課
- 2025年國家電網(wǎng)陜西省電力公司招聘筆試參考題庫含答案解析
評論
0/150
提交評論