三份实验报告都有
链接: link
建议先看老师发的视频(老师说不方便外传,这里就不发了),到某站搜c#学生信息管理系统,了解一下基本操作
重要部分源码在实验报告和文章里面都有,现在已经被我改的面目全非了呜呜
实验软件:
vs 2019
sql server
Oracle 11g
Visio(画流程图、E-R图)
Navicat Premium 15(自动生成表间关系图)
假设有“教师”、“学生”、“课程”三个实体,教师的基本信息包括:工号、姓名、职称、工资,课程的基本信息包括:课程号、课程名、学分数,学生的基本信息包括:学号、姓名、性别、年龄。系统必须满足以下要求:
根据上述描述,解答下列问题:
对于完成开发的同学,实验报告应该包括主要界面的功能测试(需要截图)以及相关的实现代码。
本次系统开发选取学生信息管理为主题,学生信息对于学校进行管理和调度具有十分重要的作用和价值。该系统的设计开发主要为学校对学生进行统一管理提供信息化的方法。
另外,此学生信息管理系统记录了学生的基本信息及其相关的课程等信息,学生通过这个学生信息管理系统可以很方便地编辑,浏览以及查询学生和老师的基本信息情况。学校也可以通过这个系统便捷地管理学生的数据信息。
(这里就是题目里的功能要求,然后我画了一个流程图)
系统功能流程图如下:
系统中共有三类用户,用户登录后先判断其身份,
若为管理员,则可以使用维护(添加、删除和修改等基本任务)学生基本信息、教师基本信息和课程基本信息、重置密码、录入课程成绩、统计不同职称的教师的数量、不同职称的教师的平均工资、统计每门课程的平均成绩、最高分、最低分、统计每个学生选修课程的总学分等功能;
若为学生,则可使用修改密码和个人基本信息、选修课程、退选课程、查询成绩、统计全部选修课程以及已经完成的(即60分以上)选修课程的总学分等功能;
若为老师,则可以使用查看个人信息等功能,
待用户操作结束后退出系统,流程停止
该模型中的实体有:学生、教师、课程
实体间联系有:
这里用数据库建好表之后连接到Navicat Premium 15,自动生成表间关系图
在Orale数据库中不同类型的数据文件,数据文件是真实存在的,数据库为数据库中的所有数据,分配逻辑数据库空间。数据库空间分配的单位是数据块、区段和段。由很多块组成区,很多区组成段,很多段组成表空间。Oracle数据库至少由两个称为表空间的逻辑存储单元组成,它们共同存储数据库的所有数据。必须拥有SYSTEM和SYSAUX表空间,一个表空间由一个或多个名为datafiles的数据文件组成,这些文件是Oracle数据库运行的操作系统上的物理结构文件。数据是存储在组成数据库的每个表空间的数据文件的。
freespace空闲空间可以自动管理,也可以手动管理,空闲空间在数据库段内自动管理。段内空闲/使用的空间使用位图跟踪,而不是使用空闲列表。自动分段空间管理提供了更好的空间利用率,特别是对于行大小差异很大的对象;更好地对并发访问中的变化进行运行时调整(并发:一个表能被多个用户使用)
在性能/空间利用率方面,能更好的多实例行为(在创建本地管理的表空间时,指定自动分段空间管理。然后,该规范应用于随后在这个表空间中创建的所有段)。
本次实验使用相关软件为:
Oracle 11g,Visual studio 2019,SQL server
create table student ( sno varchar2(10) primary key, sname varchar2(20) not null unique, ssex char(3) check(ssex in('男','女')), sage smallint not null, pwd varchar(20) not null ); create table teacher ( tno varchar(7) primary key, tname varchar(20) not null unique, tposition varchar(20) not null, tsalary smallint not null, pwd varchar(20) not null ); create table course ( cno varchar(4) primary key, cname varchar(40) not null unique, ccredit smallint not null, tno varchar(7) not null, foreign key (tno) references teacher(tno) ); create table sc ( sno varchar(10) not null, cno varchar(4) not null, grade smallint not null, primary key(sno,cno), foreign key (sno) references student(sno), foreign key (cno) references course(cno) );
insert into student(sname,ssex,sno, sage, pwd) values('哈拉木吉','男','1906300158',20,'123456'); insert into student(sname,ssex,sno, sage, pwd) values('赵四','男','1906300020',19,'123456'); insert into student(sname,ssex,sno, sage, pwd) values('lily','女','1906300195',18,'123456'); insert into student(sname,ssex,sno, sage, pwd) values('薇薇','男','1906300140',19,'123456'); insert into student(sname,ssex,sno, sage, pwd) values('欣欣子','女','1906300152',19,'123456'); insert into student(sname,ssex,sno, sage, pwd) values('shy','男','1906300121',20,'123456'); insert into student(sname,ssex,sno, sage, pwd) values('哞哞','女','1906300151',19,'123456'); insert into teacher(tno,tname, tposition, tsalary, pwd) values('t001','梁老师','教授',20000,'123456'); insert into teacher(tno,tname, tposition, tsalary, pwd) values('t002','谭乔','副教授',15000,'123456'); insert into teacher(tno,tname, tposition, tsalary, pwd) values('t003','明世隐','教授',35000,'123456'); insert into teacher(tno,tname, tposition, tsalary, pwd) values('t004','树梢','副教授',38000,'123456'); insert into teacher(tno,tname, tposition, tsalary, pwd) values('t005','周瑜','副教授',42000,'123456'); insert into teacher(tno,tname, tposition, tsalary, pwd) values('t006','小乔','教授',60000,'123456'); insert into course values('6','数值分析',2,'t001'); insert into course values('2','高等数学',4,'t002'); insert into course values('7','C++语言',4,'t003'); insert into course values('5','数据结构',4,'t004'); insert into course values('1','数据库',4,'t003'); insert into course values('3','汇编语言',3,'t006'); insert into course values('4','操作系统',3,'t005'); insert into course values('8','通往二仙桥的路',3,'t002'); insert into course values('9','b站、微博哪个更好玩',4,'t003'); insert into sc values('1906300158','1',92); insert into sc values('1906300158','2',85); insert into sc values('1906300158','3',88); insert into sc values('1906300020','2',90); insert into sc values('1906300020','3',81); insert into sc values('1906300195','4',60); insert into sc values('1906300195','5',98); insert into sc values('1906300140','5',60); insert into sc values('1906300140','7',90); insert into sc values('1906300152','8',95); insert into sc values('1906300152','2',87); select * from student; select * from course; select * from teacher; select * from sc;
create view courseinfo as select course.cno 课程编号,course.cname 课程名称,teacher.tname 任课老师,course.ccredit 课程学分,countnum 选修人数, avg_grade 平均分,max_grade 最高分,min_grade 最低分 from teacher, course left outer join (select cname, count(*) countnum,avg(grade) avg_grade,max(grade) max_grade,min(grade) min_grade from sc,course where course.cno=sc.cno group by cname)a1 on (course.cname=a1.cname) where teacher.tno=course.tno; create view studentinfo as select student.sno 学号,student.sname 姓名,(select sum(grade) from sc where sno=student.sno) 总分 , (select sum(ccredit) from course where cno in (select cno from sc where sno=student.sno)) 总学分 , (select max(grade) from sc where sc.sno in (student.sno)) 最高分,(select min(grade) from sc where sc.sno in (student.sno)) 最低分 from student; create view teacherinfo as select tposition 职位,count(tno) 在任人数,avg(tsalary) 平均工资 from teacher group by tposition; select * from studentinfo; select * from courseinfo; select * from teacherinfo1; select * from teacherinfo2; commit;
登录:
//FrmLogin.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Oracle.ManagedDataAccess.Client; namespace db_yj { public partial class FrmLogin : Form { public static string loginName = null; public FrmLogin() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { string username = tbUsername.Text; string pwd = tbPwd.Text; //string sql = string.Format("select * from student where sno='{0}' and pwd='{1}'", this.tbUsername.Text, this.tbPwd.Text); //消除sql语句--注释符号的影响 string sql = "select sno,sname from student where sno=:sno and pwd=:pwd"; OracleParameter[] para = new OracleParameter[] { new OracleParameter(":sno",OracleDbType.Varchar2,10), new OracleParameter(":pwd",OracleDbType.Varchar2,20) }; para[0].Value = username; para[1].Value = pwd; OracleConnection con = new OracleConnection(Program.strCon); try { con.Open(); OracleCommand cmd = new OracleCommand(sql, con); cmd.Parameters.AddRange(para); OracleDataReader odr = cmd.ExecuteReader(); if (odr.Read()) { loginName = odr.GetString(0); DialogResult = DialogResult.OK; MessageBox.Show("登录成功!"); this.Close(); } else MessageBox.Show("登陆失败,账号或密码错误!"); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } private void radioButton1_CheckedChanged(object sender, EventArgs e) { } private void radioButton2_CheckedChanged(object sender, EventArgs e) { } } }
(比较粉嫩,不喜勿喷)
学生信息查询、删除
//FrmStuQuery.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Oracle.ManagedDataAccess.Client; namespace db_yj { public partial class FrmStuQuery : Form { public FrmStuQuery() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { string sql = string.Format("select sno,sname,sage,ssex,pwd from student where sname like '{0}%'", textBox1.Text); OracleConnection con = new OracleConnection(Program.strCon); try { con.Open(); OracleCommand cmd = new OracleCommand(sql, con); OracleDataReader odr = cmd.ExecuteReader(); if (odr.HasRows) { BindingSource bs = new BindingSource(); bs.DataSource = odr; dataGridView1.DataSource = bs; } else dataGridView1.DataSource = null; } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } private void button2_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count == 0) return; if (MessageBox.Show("是否删除数据?", "请确认信息", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return; DataGridViewRow row = dataGridView1.SelectedRows[0]; string sno = row.Cells[0].Value.ToString(); string sql = string.Format("delete from student where sno='{0}'", sno); OracleConnection con = new OracleConnection(Program.strCon); try { con.Open(); OracleCommand cmd = new OracleCommand(sql, con); if (cmd.ExecuteNonQuery() == 1) { MessageBox.Show("删除成功!"); dataGridView1.Rows.Remove(row); } else MessageBox.Show("没有找到对应学生!"); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } private void dataGridView1_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e) { if (dataGridView1.SelectedRows.Count == 0) return; FrmStuUpdate frm = new FrmStuUpdate(); DataGridViewRow row = dataGridView1.SelectedRows[0]; frm.tbSno.Text = row.Cells[0].Value.ToString(); frm.tbSname.Text = row.Cells[1].Value.ToString(); frm.tbSage.Text = row.Cells[2].Value.ToString(); frm.tbSsex.Text = row.Cells[3].Value.ToString(); frm.tbpwd.Text = row.Cells[4].Value.ToString(); frm.ShowDialog(this); } private void label1_Click(object sender, EventArgs e) { } private void textBox1_TextChanged(object sender, EventArgs e) { } } }
学生信息修改
//FrmStuUpdate.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Oracle.ManagedDataAccess.Client; namespace db_yj { public partial class FrmStuUpdate : Form { public FrmStuUpdate() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { string sql = string.Format("update student set sname='{0}',ssex='{1}',sage={2},pwd='{3}' where sno='{4}'", tbSname.Text, tbSsex.Text, tbSage.Text,tbpwd.Text,tbSno.Text); OracleConnection con = new OracleConnection(Program.strCon); try { con.Open(); OracleCommand cmd = new OracleCommand(sql, con); if (cmd.ExecuteNonQuery() == 1) { MessageBox.Show("修改成功!"); this.Close(); } else MessageBox.Show("没有找到对应学生!"); } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } } }
学生信息插入
//FrmStuInsert.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Oracle.ManagedDataAccess.Client; namespace db_yj { public partial class FrmStuInsert : Form { public FrmStuInsert() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { string sql = string.Format("Insert into student(sno,sname,ssex,sage,pwd) values('{0}','{1}','{2}','{3}','{4}')", tbSno.Text, tbSname.Text, tbSsex.Text, tbSage.Text, tbpwd.Text); OracleConnection con = new OracleConnection(Program.strCon); try { con.Open(); OracleCommand cmd = new OracleCommand(sql, con); if (cmd.ExecuteNonQuery() == 1) { MessageBox.Show("插入成功!"); } } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } } }
课程信息查询、删除
//FrmCourseQuery.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace db_yj { public partial class FrmCourseQuery : Form { public FrmCourseQuery() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { try { this.dataGridView1.DataSource = Course.SelectCourse(this.textBox1.Text); } catch (Exception ex) { MessageBox.Show(ex.Message); } } private void dataGridView1_CellClick(object sender, DataGridViewCellEventArgs e) { if (e.RowIndex < 0) return; DataGridViewRow row = dataGridView1.Rows[e.RowIndex]; Course c = (Course)row.DataBoundItem; try { if (e.ColumnIndex == 4) { if (MessageBox.Show("确认删除?", "请确认信息", MessageBoxButtons.OKCancel) == DialogResult.Cancel) return; if (Course.DeleteCourse(c.Cno) == 1) MessageBox.Show("删除成功!"); else MessageBox.Show("没有找到对应课程!"); } else if (e.ColumnIndex == 5) { FrmCourseUpdate frm = new FrmCourseUpdate(); frm.tbCno.Text = c.Cno; frm.tbCname.Text = c.Cname; frm.tbCcredit.Text = c.Ccredit.ToString(); frm.tbTno.Text = c.tno; frm.ShowDialog(this); } } catch(Exception ex) { MessageBox.Show(ex.Message); } } } }
课程信息修改
//FrmCourseUpdate.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace db_yj { public partial class FrmCourseUpdate : Form { public FrmCourseUpdate() { InitializeComponent(); } private void label1_Click(object sender, EventArgs e) { } private void button1_Click(object sender, EventArgs e) { Course c = new Course(); c.Cno = tbCno.Text; c.Cname = tbCname.Text; c.Ccredit = Convert.ToInt32(tbCcredit.Text); c.tno = tbTno.Text; try { if (Course.UpdateCourse(c) == 1) { MessageBox.Show("修改成功!"); this.Close(); } else { MessageBox.Show("没有找到对应课程!"); } } catch(Exception ex) { MessageBox.Show(ex.Message); } } } }
课程信息插入
//FrmCourseInsert.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace db_yj { public partial class FrmCourseInsert : Form { public FrmCourseInsert() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) { Course c = new Course(); c.Cno = tbCno.Text; c.Cname = tbCname.Text; c.Ccredit = Convert.ToInt32(tbCcredit.Text); c.tno = tbTno.Text; try { Course.InertCourse(c); MessageBox.Show("插入成功!"); } catch(Exception ex) { MessageBox.Show(ex.Message); } } } }
统计每个学生总分、最高分、最低分、总学分
统计每门课程选修人数、最高分、最低分、平均分
统计每名教师授课学生总人数
统计教师不同职称的教师的数量、不同职称的教师的平均工资
//FrmStatistics.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Oracle.ManagedDataAccess.Client; namespace db_yj { public partial class FrmStatistics : Form { public FrmStatistics() { InitializeComponent(); } private void button2_Click(object sender, EventArgs e) { string sql = "select * from studentinfo"; OracleConnection con = new OracleConnection(Program.strCon); try { con.Open(); OracleCommand cmd = new OracleCommand(sql, con); OracleDataReader odr = cmd.ExecuteReader(); if (odr.HasRows) { BindingSource bs = new BindingSource(); bs.DataSource = odr; dataGridView1.DataSource = bs; } else dataGridView1.DataSource = null; } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } private void button1_Click(object sender, EventArgs e) { string sql = "select * from teacherinfo1"; OracleConnection con = new OracleConnection(Program.strCon); try { con.Open(); OracleCommand cmd = new OracleCommand(sql, con); OracleDataReader odr = cmd.ExecuteReader(); if (odr.HasRows) { BindingSource bs = new BindingSource(); bs.DataSource = odr; dataGridView1.DataSource = bs; } else dataGridView1.DataSource = null; } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } private void button3_Click(object sender, EventArgs e) { string sql = "select * from Courseinfo"; OracleConnection con = new OracleConnection(Program.strCon); try { con.Open(); OracleCommand cmd = new OracleCommand(sql, con); OracleDataReader odr = cmd.ExecuteReader(); if (odr.HasRows) { BindingSource bs = new BindingSource(); bs.DataSource = odr; dataGridView1.DataSource = bs; } else dataGridView1.DataSource = null; } catch (Exception ex) { MessageBox.Show(ex.Message); } finally { con.Close(); } } private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { } } }
窗口显示欢迎语:
//mainfrm.cs private void mainfrm_Load(object sender, EventArgs e) { this.Text = "你好," + FrmLogin.loginName + ",欢迎登录信息管理系统!"; }
附:
//mainfrm.cs using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; using Oracle.ManagedDataAccess.Client; namespace db_yj { public partial class mainfrm : Form { public mainfrm() { InitializeComponent(); } private void 查询学生ToolStripMenuItem_Click(object sender, EventArgs e) { FrmStuQuery frm = new FrmStuQuery(); frm.MdiParent = this; frm.Show(); } private void 添加学生ToolStripMenuItem_Click(object sender, EventArgs e) { FrmStuInsert frm = new FrmStuInsert(); frm.MdiParent = this; frm.Show(); } private void 课程管理ToolStripMenuItem_Click(object sender, EventArgs e) { } private void 查询课程ToolStripMenuItem1_Click(object sender, EventArgs e) { FrmCourseQuery frm = new FrmCourseQuery(); frm.MdiParent = this; frm.Show(); } private void 添加课程ToolStripMenuItem_Click(object sender, EventArgs e) { FrmCourseInsert frm = new FrmCourseInsert(); frm.MdiParent = this; frm.Show(); } private void 统计信息ToolStripMenuItem_Click(object sender, EventArgs e) { } private void 统计基本信息ToolStripMenuItem_Click(object sender, EventArgs e) { FrmStatistics frm = new FrmStatistics(); frm.MdiParent = this; frm.Show(); } private void mainfrm_Load(object sender, EventArgs e) { this.Text = "你好," + FrmLogin.loginName + ",欢迎登录信息管理系统!"; } /* xxx.visible = false; */ private void 查询教师ToolStripMenuItem_Click(object sender, EventArgs e) { FrmTeacherQuery frm = new FrmTeacherQuery(); frm.MdiParent = this; frm.Show(); } } }
//course.cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Oracle.ManagedDataAccess.Client; namespace db_yj { public class Course { public string Cno { get; set; } public string Cname { get; set; } public int Ccredit { get; set; } public string tno { get; set; } public static List<Course> SelectCourse(string cname) { string sql = "select cno,cname,ccredit,tno from Course where cname like:cname"; OracleParameter[] para = new OracleParameter[] { new OracleParameter(":cname", OracleDbType.Varchar2, 40) }; para[0].Value = cname + "%"; List<Course> list = new List<Course>(); OracleConnection con = new OracleConnection(Program.strCon); try { con.Open(); OracleCommand cmd = new OracleCommand(sql, con); cmd.Parameters.AddRange(para); OracleDataReader odr = cmd.ExecuteReader(); while (odr.Read()) { Course c = new Course(); c.Cno = odr.GetString(0); c.Cname = odr.GetString(1); c.Ccredit = odr.GetInt32(2); c.tno = odr.GetString(3); list.Add(c); } } finally { con.Close(); } return list; } public static int DeleteCourse(string cno) { int result = 0; string sql = "delete from course where cno=:cno"; OracleParameter[] para = new OracleParameter[] { new OracleParameter(":cno", OracleDbType.Varchar2, 4) }; para[0].Value = cno; OracleConnection con = new OracleConnection(Program.strCon); try { con.Open(); OracleCommand cmd = new OracleCommand(sql, con); cmd.Parameters.AddRange(para); result = cmd.ExecuteNonQuery(); } finally { con.Close(); } return result; } public static int UpdateCourse(Course c) { int result = 0; string sql = "update course set cno=:cno,Cname=:Cname,Ccredit=:Ccredit,tno=:tno where cno=:cno"; OracleParameter[] para = new OracleParameter[] { new OracleParameter(":Cno", OracleDbType.Varchar2, 4), new OracleParameter(":Cname", OracleDbType.Varchar2, 40), new OracleParameter(":Ccredit", OracleDbType.Int32), new OracleParameter(":tno", OracleDbType.Varchar2, 7) }; para[0].Value = c.Cno; para[1].Value = c.Cname; para[2].Value = c.Ccredit; para[3].Value = c.tno; OracleConnection con = new OracleConnection(Program.strCon); try { con.Open(); OracleCommand cmd = new OracleCommand(sql, con); cmd.Parameters.AddRange(para); result = cmd.ExecuteNonQuery(); } finally { con.Close(); } return result; } public static int InertCourse(Course c) { int result = 0; string sql = "insert into course(Cno,Cname,Ccredit,tno) values(:Cno,:Cname,:Ccredit,:tno)"; OracleParameter[] para = new OracleParameter[] { new OracleParameter(":Cno", OracleDbType.Varchar2, 4), new OracleParameter(":Cname", OracleDbType.Varchar2, 40), new OracleParameter(":Ccredit", OracleDbType.Int32, 38), new OracleParameter(":tno", OracleDbType.Varchar2, 7) }; para[0].Value = c.Cno; para[1].Value = c.Cname; para[2].Value = c.Ccredit; para[3].Value = c.tno; OracleConnection con = new OracleConnection(Program.strCon); try { con.Open(); OracleCommand cmd = new OracleCommand(sql, con); cmd.Parameters.AddRange(para); result = cmd.ExecuteNonQuery(); } finally { con.Close(); } return result; } } }
数据库的转储与恢复是系统正式运行后最重要的维护工作之一。
在数据库运行过程中,由于应用环境的变化,对安全性的要求也会发生变化,系统中用户的密级也会改变,需要数据库管理员不断修正以满足用户要求。
在数据库运行过程中,监督系统运行,对监测数据进行分析。
数据库运行一段时间后,由于记录不断增删改,将会使数据库的物理存储情况变坏,降低数据的存取效率,使数据库性能下降,这时数据库管理员就要对数据库进行重组织或部分重组织(只对频繁增、删的表进行重组织)。关系数据库管理系统一般都提供数据重组织的实用程序,在重组织过程中,按原设计要求重新安排存储位置、回收垃圾、减少指针链等,提高系统性能。
实验还有很多未解决的问题,在统计的过程中,不定义类,直接将视图的内容输出,会出现转换无效的情况,在sql中视图显示正常,在dataGridvView1中无法正常输出,全部转换成类,然后导入dataGridView1中,才可以输出,而且在从数据库读出的时候,还是需要先判断一下是否为空值;由于没有单独创建管理员类,管理员登录时只能特判;没有考虑输入数据是空值的情况,容易出错;没有修改创建学生类,在执行sql语句时容易出错;没有实现学生选课功能。
通过本次实验,了解概念结构设计的基本方法,理解逻辑结构设计的基本方法,理解物理结构设计的基本方法,对数据库的设计有了初步的认识。在老师教学视频的帮助下,成功的运用在VS2019的编译环境下用C#语言编写了一个学生信息管理数据库系统,该系统在查询,添加,修改,删除信息的时候会连接数据库,提高了数据的存储和查询的效率。在完成实验报告的基本要求后,为了管理系统的界面友好,又添加控件管理以及个人中心等功能。在完成本次综合实验的过程中,实验从一开始束手无策到逐渐成形,感谢老师对我们的认真指导和教诲,
希望时间充裕时可以进一步完善。
有问题的地方请多多指教~