版權說明:本文檔由用戶提供并上傳,收益歸屬內容提供方,若內容存在侵權,請進行舉報或認領
文檔簡介
1、課程設計說明書題目: 學生信息管理系統(tǒng) 院 系: 信息工程與科學學院 專業(yè)班級: 09專四 學 號: 學生姓名: 指導教師: 2011年 6 月 25 日摘要 學校學生管理信息系統(tǒng)是針對學校人事處的大量業(yè)務處理工作而開發(fā)的管理軟件,是典型的管理信息系統(tǒng)(management information system)。它是一個教育單位不可缺少的部分,它的內容對于學校的決策者和管理者來說都至關重要,它能夠為用戶提供充足的信息和快捷的查詢手段。能有效的幫助學校和老師掌握學生的情況,為學生提供成績跟課程方面的查詢。目錄摘要-1目錄-2一概述-3二主要功能-3三需求分析-3四概念模型設計-5五邏輯和物理結
2、構設計-6六 數(shù)據(jù)庫的實施與維護-8七總結-13一 概述1.1目的與要求隨著科技的發(fā)展,基本上所有的具有一定數(shù)量數(shù)據(jù)的機構都開始使用計算機數(shù)據(jù)庫來做管理。幾乎所有學校也都已經(jīng)在使用計算機管理數(shù)據(jù)的機制,大大減少了學校學生成績管理的工作量。該課程設計要求設計一個學生成績的數(shù)據(jù)庫管理系統(tǒng),數(shù)據(jù)庫中要求包含學生的基本信息,學科基本信息,以及學生所學課程的考試成績。要方便學生進行成績查詢,通過該課程設計,應該達到把數(shù)據(jù)庫理論知識更加的鞏固加深,加強動手能力與實踐能力,學以致用,與現(xiàn)實生活中的應用充分的結合起來。二 主要功能1學籍信息管理2班級信息管理3課程信息管理4成績信息管理5系統(tǒng)管理三 需求分析系
3、統(tǒng)功能要求設計此系統(tǒng)實現(xiàn)如下系統(tǒng)功能:(1)使得學生的成績管理工作更加清晰、條理化、自動化。(2)通過用戶名和密碼登錄系統(tǒng),查詢課程基本資料,學生所選課程成績,修改用戶密碼等功能。 容易地完成學生信息的查詢操作。(3) 設計人機友好界面,功能安排合理,操作使用方便,并且進一步考慮系統(tǒng)在安全性,完整性,并發(fā)控制,備份和恢復等方面的功能要求。 系統(tǒng)模塊設計登陸失敗學生管理課程管理退出系統(tǒng)用戶驗證成績查詢登陸成功成績管理系統(tǒng)大體可以分成二大模塊如, 一是學生的基本信息模塊,里面應該包含學生的各方面的基本信息;再者便是課程管理模塊, 在該模塊中應該包含有對學生成績信息的查詢和處理,如平均成績、最好成績
4、、最差成績以及不及格學生的統(tǒng)計等功能模塊;再其次還有教師、課程等相關信息的模塊;可以得到系統(tǒng)流程圖: 數(shù)據(jù)字典 數(shù)據(jù)項是數(shù)據(jù)庫的關系中不可再分的數(shù)據(jù)單位,下表分別列出了數(shù)據(jù)的名稱、數(shù)據(jù)類型、長度、取值能否為空。利用sql server 2000建立“學生選課”數(shù)據(jù)庫,其基本表清單及表結構描述如下:數(shù)據(jù)庫中用到的表:數(shù)據(jù)庫表名關系模式名稱備注student學生學生學籍信息表course課程課程基本信息表score成績選課成績信息表student基本情況數(shù)據(jù)表,結構如下:字段名字段類型not null說明student _snocharprimary key學號student _sncharnot
5、 null學生姓名student _sexchar男或女性別student _deptchar系別student_agechar年齡student_addresschar地址course數(shù)據(jù)表,結構如下:字段名字段類型約束控制說明course_cnochar主鍵(primary key)課程號course_cnamecharnot null課程名稱course_hourintnot null課時course_scorenumeric(2,1)not null學分score情況數(shù)據(jù)表,結構如下:字段名字段類型約束控制說明score_idintnot null成績記錄號course_cnochar
6、外部鍵課程號student_snochar外部鍵學號scoreint成績四 概念模型設計由需求分析的結果可知,本系統(tǒng)設計的實體包括:(1)學生基本信息:學號,姓名,性別,地址,年齡,專業(yè)。(2)課程基本信息: 課程名,課程號,分數(shù),學時,學分。 這些實體間的聯(lián)系包括:(1)每位學生可以學習多門課程,每門課程可供多位學生學習。由上述分析可得到系統(tǒng)的er圖:選修課程成績學生課程號課程名學時 學分分數(shù)學號姓名性別系別 地址年齡五邏輯和物理結構設計由系統(tǒng)er圖轉化而得到的關系模式如下:(1)學生(學號,姓名,性別,年齡,地址,系別),其主關鍵字為學號;(2)課程(課程名,課程號,學時,學分),其中主關
7、鍵字為課程號;(3)成績(課程號,學號,分數(shù))其中主關鍵字為學號和課程號??梢耘c學生關系模式合并為:學生(學號,姓名,性別,年齡,地址,系別,成績,課程號)。 確定關系模型的存取方法在將概念模型轉換成物理模型之后,我們可以對物理模型進行設計,雙擊物理模型的關系,可以對該關系的名稱、注釋等信息進行查詢??蓪υ撽P系的屬性列進行設計,可分別設置其名稱、碼、數(shù)據(jù)類型以及主碼、是否為空等。在實際設計中最常用的存取方法是索引發(fā),使用索引可以大大減少數(shù)據(jù)的查詢時間,在建立索引時應遵循:在經(jīng)常需要搜索的列上建立索引; 在主關鍵字上建立索引;在經(jīng)常用于連接的列上建立索引,即在外鍵上建立索引;在經(jīng)常需要根據(jù)范圍進
8、行搜索的列上創(chuàng)建索引,因為索引已經(jīng)排序,其指定的范圍是連續(xù)的等規(guī)則。才能充分利用索引的作用避免因索引引起的負面作用。 確定數(shù)據(jù)庫的存儲結構確定數(shù)據(jù)庫的存儲結構主要指確定數(shù)據(jù)的存放位置和存儲結構,包括確定關系、索引、日志、備份等的存儲安排及存儲結構,以及確定系統(tǒng)存儲參數(shù)的配置。因為該成績管理系統(tǒng)的數(shù)據(jù)量小,所以我們只用把數(shù)據(jù)存儲在使用的電腦硬盤上,不用作更多的安排。(1)創(chuàng)建學生基本信息表:create table student ( 學號 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 (學號)goexecute sp_addextendedproperty ms_description, 學生基本信息描述, 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 (課程號)goexecute sp_addextendedproperty ms_description, (3)創(chuàng)建學生與課程的成績表create table sc ( sno varchar(11) not null,cno varchar(5) not null,chengji varchar(4) not null constraint pk_sc primary key (學號, 課程號)go在sc表上創(chuàng)建索引sc_fk與sc2_fkcreate index sc_fk on sc (學號 asc)goc
11、reate index sc2_fk on sc (課程號 asc)go 建立課程號索引create index tc_fk on tc (課程號 asc)go下圖顯示了學生,課程和成績三個關系的物理設計其中課程號與學號號分別為關系的主碼。 六 數(shù)據(jù)庫的實施與維護數(shù)據(jù)庫的實施:此階段主要任務包括創(chuàng)建數(shù)據(jù)庫,加載初始數(shù)據(jù),數(shù)據(jù)庫試運行,數(shù)據(jù)庫的安全性和完整性控制數(shù)據(jù)庫的備份與恢復,數(shù)據(jù)庫性能的監(jiān)督分析和改僅,數(shù)據(jù)庫的重組和重構等。首先在數(shù)據(jù)庫中建立一個學生成績管理系統(tǒng)數(shù)據(jù)庫,然后新建一個數(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班級);/符合就調用班級表的字段 班級 adoquery2.next;end;end; procedure tform11.combobox2select(sender: tobject);beginadoquery4.close;adoquery4.sql.clear;adoquery4.sql.add(select * from kecheng where 班級=+combobox2.text+);/查詢課程表中字段 班級 是否符合,符合就調到adoquery4.execsql; /dbgiid1adoquery4.open
14、;end; procedure tform11.combobox3select(sender: tobject);beginadoquery4.close;adoquery4.sql.clear;adoquery4.sql.add(select * from kecheng where 班級=+combobox2.text+ and 學期=+combobox3.text+); /判斷學期是否符合adoquery4.execsql;adoquery4.open;end; procedure tform11.speedbutton1click(sender: tobject);beginwhile
15、 not adoquery4.eof dobeginif (adoquery4.fieldvalues課程號=adoquery3.fieldvalues課程號) and (adoquery4.fieldvalues班級=combobox2.text) and (adoquery4.fieldvalues學期=combobox3.text) thenbreak;adoquery4.next;end;if adoquery4.eof thenbeginadoquery4.insert; /把選課內容添加到選課表中。 adoquery4.fieldvalues課程號:=adoquery3.field
16、values課程號;adoquery4.fieldvalues班級:=combobox2.text;adoquery4.fieldvalues課程名:=adoquery3.fieldvalues課程名;adoquery4.fieldvalues學期:=combobox3.text;adoquery4.post;endelsebeginshowmessage(本課程此班級已經(jīng)選過); /如果已經(jīng)選過,彈出對話框“本課程此班級已經(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; /關閉數(shù)據(jù)庫adoquery3.sql.clear; /清空adoquery3.sql.add(select * from kechengbiao);adoquery3.execsql;adoquery3.open;dbedit1.datafield:=課程號;dbedit2.datafield:=課程名;dbedit3.datafield:=課時;dbedit4.datafield
18、:=學分;/dbcombobox1.datafield:=學期;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(請輸入課程號!); /如果課程號沒輸入,彈出對話框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ù)庫關閉adoquery1.sql.clear; /清空adoquery1內的sql值清空adoquery1.sql.add(select * from kecheng where +combobox1.text+ = +edit1.text+ and 學期 = +combobox2.text+
25、); /合并查詢,符合的話在dbgrid中顯示出來adoquery1.execsql;adoquery1.open;endelsebeginadoquery1.close;adoquery1.sql.clear;adoquery1.sql.add(select * from kecheng where +combobox1.text+ = +edit1.text+);/單個條件查詢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等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內容里面會有圖紙預覽,若沒有圖紙預覽就沒有圖紙。
- 4. 未經(jīng)權益所有人同意不得將文件中的內容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內容本身不做任何修改或編輯,并不能對任何下載內容負責。
- 6. 下載文件中如有侵權或不適當內容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準確性、安全性和完整性, 同時也不承擔用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 二零二五年度勞動合同終止及員工安置補償協(xié)議2篇
- 二零二五年度戶外廣告牌安裝與城市形象宣傳合同3篇
- 二零二五年度個人商鋪買賣合同協(xié)議
- 二零二五年度國際貿易政策分析與市場進入咨詢合同
- 2025年度個人房屋裝修貸款合同7篇
- 2025年度內控制度咨詢與內部控制流程再造合同
- 二零二五年度協(xié)議離婚財產(chǎn)清算與分配專業(yè)合同3篇
- 2025年度農(nóng)業(yè)生態(tài)環(huán)境保護與補償合同3篇
- 2025年度摩托車租賃與賽事運營管理合同3篇
- 二零二五版鎳礦市場準入與資質認證合同4篇
- 2024版義務教育小學數(shù)學課程標準
- 智能護理:人工智能助力的醫(yī)療創(chuàng)新
- 國家中小學智慧教育平臺培訓專題講座
- 5G+教育5G技術在智慧校園教育專網(wǎng)系統(tǒng)的應用
- 服務人員隊伍穩(wěn)定措施
- VI設計輔助圖形設計
- 淺談小學勞動教育的開展與探究 論文
- 2023年全國4月高等教育自學考試管理學原理00054試題及答案新編
- 河北省大學生調研河北社會調查活動項目申請書
- JJG 921-2021環(huán)境振動分析儀
- 兩段焙燒除砷技術簡介 - 文字版(1)(2)課件
評論
0/150
提交評論