




版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
1、課程設(shè)計(jì)說明書題目: 學(xué)生信息管理系統(tǒng) 院 系: 信息工程與科學(xué)學(xué)院 專業(yè)班級(jí): 09專四 學(xué) 號(hào): 學(xué)生姓名: 指導(dǎo)教師: 2011年 6 月 25 日摘要 學(xué)校學(xué)生管理信息系統(tǒng)是針對(duì)學(xué)校人事處的大量業(yè)務(wù)處理工作而開發(fā)的管理軟件,是典型的管理信息系統(tǒng)(management information system)。它是一個(gè)教育單位不可缺少的部分,它的內(nèi)容對(duì)于學(xué)校的決策者和管理者來說都至關(guān)重要,它能夠?yàn)橛脩籼峁┏渥愕男畔⒑涂旖莸牟樵兪侄?。能有效的幫助學(xué)校和老師掌握學(xué)生的情況,為學(xué)生提供成績(jī)跟課程方面的查詢。目錄摘要-1目錄-2一概述-3二主要功能-3三需求分析-3四概念模型設(shè)計(jì)-5五邏輯和物理結(jié)
2、構(gòu)設(shè)計(jì)-6六 數(shù)據(jù)庫(kù)的實(shí)施與維護(hù)-8七總結(jié)-13一 概述1.1目的與要求隨著科技的發(fā)展,基本上所有的具有一定數(shù)量數(shù)據(jù)的機(jī)構(gòu)都開始使用計(jì)算機(jī)數(shù)據(jù)庫(kù)來做管理。幾乎所有學(xué)校也都已經(jīng)在使用計(jì)算機(jī)管理數(shù)據(jù)的機(jī)制,大大減少了學(xué)校學(xué)生成績(jī)管理的工作量。該課程設(shè)計(jì)要求設(shè)計(jì)一個(gè)學(xué)生成績(jī)的數(shù)據(jù)庫(kù)管理系統(tǒng),數(shù)據(jù)庫(kù)中要求包含學(xué)生的基本信息,學(xué)科基本信息,以及學(xué)生所學(xué)課程的考試成績(jī)。要方便學(xué)生進(jìn)行成績(jī)查詢,通過該課程設(shè)計(jì),應(yīng)該達(dá)到把數(shù)據(jù)庫(kù)理論知識(shí)更加的鞏固加深,加強(qiáng)動(dòng)手能力與實(shí)踐能力,學(xué)以致用,與現(xiàn)實(shí)生活中的應(yīng)用充分的結(jié)合起來。二 主要功能1學(xué)籍信息管理2班級(jí)信息管理3課程信息管理4成績(jī)信息管理5系統(tǒng)管理三 需求分析系
3、統(tǒng)功能要求設(shè)計(jì)此系統(tǒng)實(shí)現(xiàn)如下系統(tǒng)功能:(1)使得學(xué)生的成績(jī)管理工作更加清晰、條理化、自動(dòng)化。(2)通過用戶名和密碼登錄系統(tǒng),查詢課程基本資料,學(xué)生所選課程成績(jī),修改用戶密碼等功能。 容易地完成學(xué)生信息的查詢操作。(3) 設(shè)計(jì)人機(jī)友好界面,功能安排合理,操作使用方便,并且進(jìn)一步考慮系統(tǒng)在安全性,完整性,并發(fā)控制,備份和恢復(fù)等方面的功能要求。 系統(tǒng)模塊設(shè)計(jì)登陸失敗學(xué)生管理課程管理退出系統(tǒng)用戶驗(yàn)證成績(jī)查詢登陸成功成績(jī)管理系統(tǒng)大體可以分成二大模塊如, 一是學(xué)生的基本信息模塊,里面應(yīng)該包含學(xué)生的各方面的基本信息;再者便是課程管理模塊, 在該模塊中應(yīng)該包含有對(duì)學(xué)生成績(jī)信息的查詢和處理,如平均成績(jī)、最好成績(jī)
4、、最差成績(jī)以及不及格學(xué)生的統(tǒng)計(jì)等功能模塊;再其次還有教師、課程等相關(guān)信息的模塊;可以得到系統(tǒng)流程圖: 數(shù)據(jù)字典 數(shù)據(jù)項(xiàng)是數(shù)據(jù)庫(kù)的關(guān)系中不可再分的數(shù)據(jù)單位,下表分別列出了數(shù)據(jù)的名稱、數(shù)據(jù)類型、長(zhǎng)度、取值能否為空。利用sql server 2000建立“學(xué)生選課”數(shù)據(jù)庫(kù),其基本表清單及表結(jié)構(gòu)描述如下:數(shù)據(jù)庫(kù)中用到的表:數(shù)據(jù)庫(kù)表名關(guān)系模式名稱備注student學(xué)生學(xué)生學(xué)籍信息表course課程課程基本信息表score成績(jī)選課成績(jī)信息表student基本情況數(shù)據(jù)表,結(jié)構(gòu)如下:字段名字段類型not null說明student _snocharprimary key學(xué)號(hào)student _sncharnot
5、 null學(xué)生姓名student _sexchar男或女性別student _deptchar系別student_agechar年齡student_addresschar地址course數(shù)據(jù)表,結(jié)構(gòu)如下:字段名字段類型約束控制說明course_cnochar主鍵(primary key)課程號(hào)course_cnamecharnot null課程名稱course_hourintnot null課時(shí)course_scorenumeric(2,1)not null學(xué)分score情況數(shù)據(jù)表,結(jié)構(gòu)如下:字段名字段類型約束控制說明score_idintnot null成績(jī)記錄號(hào)course_cnochar
6、外部鍵課程號(hào)student_snochar外部鍵學(xué)號(hào)scoreint成績(jī)四 概念模型設(shè)計(jì)由需求分析的結(jié)果可知,本系統(tǒng)設(shè)計(jì)的實(shí)體包括:(1)學(xué)生基本信息:學(xué)號(hào),姓名,性別,地址,年齡,專業(yè)。(2)課程基本信息: 課程名,課程號(hào),分?jǐn)?shù),學(xué)時(shí),學(xué)分。 這些實(shí)體間的聯(lián)系包括:(1)每位學(xué)生可以學(xué)習(xí)多門課程,每門課程可供多位學(xué)生學(xué)習(xí)。由上述分析可得到系統(tǒng)的er圖:選修課程成績(jī)學(xué)生課程號(hào)課程名學(xué)時(shí) 學(xué)分分?jǐn)?shù)學(xué)號(hào)姓名性別系別 地址年齡五邏輯和物理結(jié)構(gòu)設(shè)計(jì)由系統(tǒng)er圖轉(zhuǎn)化而得到的關(guān)系模式如下:(1)學(xué)生(學(xué)號(hào),姓名,性別,年齡,地址,系別),其主關(guān)鍵字為學(xué)號(hào);(2)課程(課程名,課程號(hào),學(xué)時(shí),學(xué)分),其中主關(guān)
7、鍵字為課程號(hào);(3)成績(jī)(課程號(hào),學(xué)號(hào),分?jǐn)?shù))其中主關(guān)鍵字為學(xué)號(hào)和課程號(hào)。可以與學(xué)生關(guān)系模式合并為:學(xué)生(學(xué)號(hào),姓名,性別,年齡,地址,系別,成績(jī),課程號(hào))。 確定關(guān)系模型的存取方法在將概念模型轉(zhuǎn)換成物理模型之后,我們可以對(duì)物理模型進(jìn)行設(shè)計(jì),雙擊物理模型的關(guān)系,可以對(duì)該關(guān)系的名稱、注釋等信息進(jìn)行查詢??蓪?duì)該關(guān)系的屬性列進(jìn)行設(shè)計(jì),可分別設(shè)置其名稱、碼、數(shù)據(jù)類型以及主碼、是否為空等。在實(shí)際設(shè)計(jì)中最常用的存取方法是索引發(fā),使用索引可以大大減少數(shù)據(jù)的查詢時(shí)間,在建立索引時(shí)應(yīng)遵循:在經(jīng)常需要搜索的列上建立索引; 在主關(guān)鍵字上建立索引;在經(jīng)常用于連接的列上建立索引,即在外鍵上建立索引;在經(jīng)常需要根據(jù)范圍進(jìn)
8、行搜索的列上創(chuàng)建索引,因?yàn)樗饕呀?jīng)排序,其指定的范圍是連續(xù)的等規(guī)則。才能充分利用索引的作用避免因索引引起的負(fù)面作用。 確定數(shù)據(jù)庫(kù)的存儲(chǔ)結(jié)構(gòu)確定數(shù)據(jù)庫(kù)的存儲(chǔ)結(jié)構(gòu)主要指確定數(shù)據(jù)的存放位置和存儲(chǔ)結(jié)構(gòu),包括確定關(guān)系、索引、日志、備份等的存儲(chǔ)安排及存儲(chǔ)結(jié)構(gòu),以及確定系統(tǒng)存儲(chǔ)參數(shù)的配置。因?yàn)樵摮煽?jī)管理系統(tǒng)的數(shù)據(jù)量小,所以我們只用把數(shù)據(jù)存儲(chǔ)在使用的電腦硬盤上,不用作更多的安排。(1)創(chuàng)建學(xué)生基本信息表:create table student ( 學(xué)號(hào) varchar(11) not null, 系別 varchar(5) not null, 姓名 varchar(6) not null, 性別 varch
9、ar(2) not null, 年齡 char(2) not null, 地址 varchar(20) not null, constraint pk_student primary key (學(xué)號(hào))goexecute sp_addextendedproperty ms_description, 學(xué)生基本信息描述, user, , table, studentsinfogo(2)創(chuàng)建課程表:create table course ( cno varchar(5) not null, cname varchar(10) null, xueshi smallint null, xuefen int
10、 null, constraint pk_course primary key (課程號(hào))goexecute sp_addextendedproperty ms_description, (3)創(chuàng)建學(xué)生與課程的成績(jī)表create table sc ( sno varchar(11) not null,cno varchar(5) not null,chengji varchar(4) not null constraint pk_sc primary key (學(xué)號(hào), 課程號(hào))go在sc表上創(chuàng)建索引sc_fk與sc2_fkcreate index sc_fk on sc (學(xué)號(hào) asc)goc
11、reate index sc2_fk on sc (課程號(hào) asc)go 建立課程號(hào)索引create index tc_fk on tc (課程號(hào) asc)go下圖顯示了學(xué)生,課程和成績(jī)?nèi)齻€(gè)關(guān)系的物理設(shè)計(jì)其中課程號(hào)與學(xué)號(hào)號(hào)分別為關(guān)系的主碼。 六 數(shù)據(jù)庫(kù)的實(shí)施與維護(hù)數(shù)據(jù)庫(kù)的實(shí)施:此階段主要任務(wù)包括創(chuàng)建數(shù)據(jù)庫(kù),加載初始數(shù)據(jù),數(shù)據(jù)庫(kù)試運(yùn)行,數(shù)據(jù)庫(kù)的安全性和完整性控制數(shù)據(jù)庫(kù)的備份與恢復(fù),數(shù)據(jù)庫(kù)性能的監(jiān)督分析和改僅,數(shù)據(jù)庫(kù)的重組和重構(gòu)等。首先在數(shù)據(jù)庫(kù)中建立一個(gè)學(xué)生成績(jī)管理系統(tǒng)數(shù)據(jù)庫(kù),然后新建一個(gè)數(shù)據(jù)源。主要代碼如下:begin combobox1.items.append(adoquery1.field
12、values系名); /combobox1連到系表的 系名 字段 adoquery1.next;end; end;procedure tform11.combobox1select(sender: tobject);beginadoquery2.close;adoquery2.sql.clear;adoquery2.sql.add(select * from class where 系名=+combobox1.text+);/查詢系名是否符合adoquery2.execsql;adoquery2.open;while not adoquery2.eof do begin combobox2.i
13、tems.append(adoquery2.fieldvalues班級(jí));/符合就調(diào)用班級(jí)表的字段 班級(jí) adoquery2.next;end;end; procedure tform11.combobox2select(sender: tobject);beginadoquery4.close;adoquery4.sql.clear;adoquery4.sql.add(select * from kecheng where 班級(jí)=+combobox2.text+);/查詢課程表中字段 班級(jí) 是否符合,符合就調(diào)到adoquery4.execsql; /dbgiid1adoquery4.open
14、;end; procedure tform11.combobox3select(sender: tobject);beginadoquery4.close;adoquery4.sql.clear;adoquery4.sql.add(select * from kecheng where 班級(jí)=+combobox2.text+ and 學(xué)期=+combobox3.text+); /判斷學(xué)期是否符合adoquery4.execsql;adoquery4.open;end; procedure tform11.speedbutton1click(sender: tobject);beginwhile
15、 not adoquery4.eof dobeginif (adoquery4.fieldvalues課程號(hào)=adoquery3.fieldvalues課程號(hào)) and (adoquery4.fieldvalues班級(jí)=combobox2.text) and (adoquery4.fieldvalues學(xué)期=combobox3.text) thenbreak;adoquery4.next;end;if adoquery4.eof thenbeginadoquery4.insert; /把選課內(nèi)容添加到選課表中。 adoquery4.fieldvalues課程號(hào):=adoquery3.field
16、values課程號(hào);adoquery4.fieldvalues班級(jí):=combobox2.text;adoquery4.fieldvalues課程名:=adoquery3.fieldvalues課程名;adoquery4.fieldvalues學(xué)期:=combobox3.text;adoquery4.post;endelsebeginshowmessage(本課程此班級(jí)已經(jīng)選過); /如果已經(jīng)選過,彈出對(duì)話框“本課程此班級(jí)已經(jīng)選過”end;end;procedure tform11.speedbutton2click(sender: tobject);beginif not adoquery4
17、.eof thenadoquery4.delete;end;end. 課程管理:procedure tform9.formcreate(sender: tobject);beginadoquery3.close; /關(guān)閉數(shù)據(jù)庫(kù)adoquery3.sql.clear; /清空adoquery3.sql.add(select * from kechengbiao);adoquery3.execsql;adoquery3.open;dbedit1.datafield:=課程號(hào);dbedit2.datafield:=課程名;dbedit3.datafield:=課時(shí);dbedit4.datafield
18、:=學(xué)分;/dbcombobox1.datafield:=學(xué)期;dbcombobox2.datafield:=類型; end; procedure tform9.speedbutton1click(sender: tobject);beginif speedbutton1.caption=添加 thenbeginadoquery3.insert; /添加到課程表speedbutton1.caption:=確定;speedbutton4.enabled:=true;speedbutton2.enabled:=false;speedbutton3.enabled:=false;endelseif
19、speedbutton1.caption=確定 thenbeginif dbedit1.text= thenbeginshowmessage(請(qǐng)輸入課程號(hào)!); /如果課程號(hào)沒輸入,彈出對(duì)話框endelsebeginadoquery3.post;speedbutton1.caption:=添加;speedbutton4.enabled:=false;speedbutton2.enabled:=true;speedbutton3.enabled:=true;end;end;end; procedure tform9.speedbutton2click(sender: tobject);begin
20、if adoquery3.eof thenbeginspeedbutton2.enabled:=false;speedbutton3.enabled:=false;end;if speedbutton2.caption=刪除 thenbeginspeedbutton2.caption:=確定;speedbutton4.enabled:=true;speedbutton1.enabled:=false;speedbutton3.enabled:=false;endelsebeginadoquery3.delete; /從數(shù)據(jù)表中刪掉所選記錄speedbutton2.caption:=刪除;spe
21、edbutton4.enabled:=false;speedbutton1.enabled:=true;speedbutton3.enabled:=true;end;end; procedure tform9.speedbutton4click(sender: tobject);begin adoquery3.cancel;speedbutton1.caption:=添加;speedbutton2.caption:=刪除;speedbutton3.caption:=修改;speedbutton4.enabled:=false;speedbutton1.enabled:=true;speedbu
22、tton2.enabled:=true;speedbutton3.enabled:=true;end; procedure tform9.speedbutton3click(sender: tobject);beginif speedbutton3.caption=修改 thenbeginadoquery3.edit; /修改課程表中的記錄speedbutton3.caption:=確定;speedbutton4.enabled:=true;speedbutton2.enabled:=false;speedbutton1.enabled:=false;endelsebeginadoquery3
23、.post;speedbutton3.caption:=修改;speedbutton4.enabled:=false;speedbutton2.enabled:=true;speedbutton1.enabled:=true;end; end; procedure tform9.label1dblclick(sender: tobject);beginform11:=tform11.create(application);form11.showmodal; end;end. 課程查詢部分:procedure tform4.combobox1select(sender: tobject); be
24、ginedit1.text:=;button1.enabled:=false;end; procedure tform4.button1click(sender: tobject);beginif checkbox1.checked=true thenbeginadoquery1.close; /先將數(shù)據(jù)庫(kù)關(guān)閉adoquery1.sql.clear; /清空adoquery1內(nèi)的sql值清空adoquery1.sql.add(select * from kecheng where +combobox1.text+ = +edit1.text+ and 學(xué)期 = +combobox2.text+
25、); /合并查詢,符合的話在dbgrid中顯示出來adoquery1.execsql;adoquery1.open;endelsebeginadoquery1.close;adoquery1.sql.clear;adoquery1.sql.add(select * from kecheng where +combobox1.text+ = +edit1.text+);/單個(gè)條件查詢adoquery1.execsql;adoquery1.open;end;end; procedure tform4.n2click(sender: tobject);begin /開啟其他管理界面form2.show;form4.close;end; procedure tform4.n3click(sender: tobject);begin form3.show;form4.close;end; procedure tform4.n4click(sender: tobject);beginform5.show;form4.close;end; procedure tform4.n6click(sender: tobject);beginform1.show;form4.close;end; procedure tform4.n7click(sender: tobject);b
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁(yè)內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫(kù)網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 墻地磚合同范本
- 全書定制合同范本
- 單位電腦采購(gòu)合同范本
- 單位與保安合同范本
- 個(gè)人投資合伙合同范本
- 修路轉(zhuǎn)讓合同范例
- 入圍合同范本
- 做線上合同范本
- 麻城外包型鋼加固施工方案
- 《酷蟲學(xué)校 第1 12冊(cè) 注音版 》讀書筆記思維導(dǎo)圖PPT模板下載
- 中華人民共和國(guó)環(huán)境保護(hù)法
- Monkey Fishes The Moon(英語(yǔ)演講ppt猴子撈月)
- 湘教版八年級(jí)地理下冊(cè)全冊(cè)教案
- 戰(zhàn)略管理徐飛版課件
- 棄渣場(chǎng)的水土保持審查與管理
- 農(nóng)業(yè)銀行境外匯款申請(qǐng)書樣板
- 馬工程《刑法學(xué)(下冊(cè))》教學(xué)課件 第22章 妨害社會(huì)管理秩序罪
- GB/T 15886-1995C型射頻同軸連接器
- GB/T 14643.6-2009工業(yè)循環(huán)冷卻水中菌藻的測(cè)定方法第6部分:鐵細(xì)菌的測(cè)定MPN法
- GB/T 1096-2003普通型平鍵
評(píng)論
0/150
提交評(píng)論