数据库课程设计学生选课管理系统Word文件下载.docx
《数据库课程设计学生选课管理系统Word文件下载.docx》由会员分享,可在线阅读,更多相关《数据库课程设计学生选课管理系统Word文件下载.docx(16页珍藏版)》请在冰豆网上搜索。
![数据库课程设计学生选课管理系统Word文件下载.docx](https://file1.bdocx.com/fileroot1/2023-1/27/8491ed6a-46b3-4812-9d65-3d3d24b97512/8491ed6a-46b3-4812-9d65-3d3d24b975121.gif)
borndate
出生年月
Sschyear
int
入学年份
Spassword
nchar(6)
系统登录密码
(2)、教师表属性举例(Teacher)
Tno(主码)
工号
Tname
nvarchar(50)
Tpassword
登录密码
(3)、专业表属性举例(Major)
Mno
char(10)
专业代号
Mname
专业名字
(4)、课程表属性举例(Course)
Cno(主码)
Cpno(外码)
先修课程代号
Mno(外码)
Cname
课程名称
Ccredit
课程学分
(5)、专业课程表属性举例(MC)
Mno(主码)
Cno
课程号
Year
年级
Cproperty
课程性质
(6)、学生课程信息表属性举例(SC)
Sno
char(12)
Grade
成绩
(Sno,Cno)为主码,Sno,Cno为外码
(7)、班级表属性举例(Class)
Clno(主码)
班级号
专业号
Clname
班级名
1
2.3逻辑结构设计
关系模式
Student(Sno,Sname,Ssex,Borndate,Sphoto,SID,Sschyear,Spassword,Status,race,bornplace,Spassword,Clno);
Department(Deptno,Deptname,Password)
Major(Mno,Mname,ReCredit,SeCredit,Deptno);
Course(Cno,Cname,Ccredit,Chour,Cpno,Deptno);
Class(Clno,Clname,Mno)
Teacher(Tno,Tname,TID,Tpassword,Bornplace,Race,Status,Title,Tsex,Tphoto,Borndate,Deptno);
MC(Mno,Cno,Cyear,Cterm,Cproperty,Tno)
SC(Sno,Cno,Grade);
标下划线的属性或者属性组为该关系模式的主码,并且在关系中定义了外码。
各个关系的参照图如下所示:
2.4相关程序代码举例
(1)StudentGrade.xaml
<
Windowx:
Class="
Database.StudentGrade"
xmlns="
xmlns:
x="
Title="
学¡
ì
生¦
¨
²
成¨
¦
绩¡
§
查¨
询¡
¥
"
Height="
562"
Width="
616"
Loaded="
Window_Loaded"
ResizeMode="
NoResize"
WindowStartupLocation="
CenterScreen"
>
<
GridHeight="
500"
582"
ComboBoxHeight="
21"
HorizontalAlignment="
Left"
Name="
comboBox1"
Margin="
65,12,0,0"
VerticalAlignment="
Top"
141"
SelectionChanged="
comboBox1_SelectionChanged"
/>
300,12,0,0"
comboBox2"
VerticalAlignment="
82"
ButtonContent="
历¤
年¨
º
29"
12,57,0,0"
button1"
104"
Click="
button1_Click"
必À
?
修T成¨
165,57,0,0"
button2"
button2_Click"
选?
Right"
0,57,154,0"
button3"
button3_Click"
0,12,20,0"
comboBox3"
83"
统ª
3计?
469,58,0,0"
button4"
button4_Click"
LabelContent="
12,12,0,0"
label1"
46"
期¨
26"
243,9,0,0"
label2"
39"
性?
质¨
427,7,0,0"
label3"
65,108,0,0"
button5"
70"
button5_Click"
取¨
消?
27"
0,108,71,0"
button6"
71"
202"
50,200,0,0"
grid1"
504"
>
已°
获?
修T学¡
分¤
24,30,0,0"
label4"
94"
24,0,0,94"
label5"
Bottom"
80"
124,30,0,0"
label6"
107"
124,79,0,0"
label7"
差?
262,27,0,0"
label8"
262,79,0,0"
label9"
69"
357,30,0,0"
label10"
357,79,0,0"
label11"
所¨
´
需¨
总Á
¹
24,131,0,0"
label12"
124,131,0,0"
label13"
262,131,0,0"
label14"
95"
357,131,0,0"
label15"
BorderBorderBrush="
Black"
BorderThickness="
1"
0,120,0,0"
border5"
496"
160"
495,20,0,0"
border4"
0,179,0,0"
border2"
0,20,0,0"
border3"
0,70,0,0"
border1"
border7"
2"
/Grid>
GridMargin="
0,0,4,0"
DataGridAutoGenerateColumns="
False"
327"
42,164,0,0"
dataGrid1"
CanUserAddRows="
True"
dataGrid1_SelectionChanged"
DataGrid.Columns>
DataGridTextColumnBinding="
{BindingPath=Cno}"
Header="
课?
程¨
¬
号?
100"
{BindingPath=Cname}"
名?
{BindingPath=Grade}"
{BindingPath=Cproperty}"
属º
{BindingPath=Ccredit}"
/DataGrid.Columns>
/DataGrid>
/Window>
(2)StudentInfo.xaml
Database.StudentInfo"
信?
息¡
é
421"
701"
358"
Grid.ColumnDefinitions>
ColumnDefinitionWidth="
9*"
470*"
200*"
/Grid.ColumnDefinitions>
姓?
27,21,0,0"
name"
38"
Grid.Column="
LabelHeight="
27,79,0,0"
sex"
Content="
别À
e"
在¨
班ã
¤
级?
30"
13,247,0,0"
class"
58"
专Á
¡
业°
Ì
25"
233,247,0,0"
major"
60"
入¨
份¤
Y"
233,198,0,0"
year"
68"
27,201,0,0"
sno"
0,117,0,0"
480"
Grid.ColumnSpan="
3"
0,64,0,0"
0,178,0,0"
/Border>
0,230,0,0"
BorderBorder