知名网站建设定制学生信息管理系统(数据库)

 一 . 知名网站建设定制学生信息管理系统资源

下载链接

二.知名网站建设定制数据库设计 

2.1ER图设计

2.2从ER知名网站建设定制图到关系模式

知名网站建设定制中存在三个实体:学生、课程、成绩;两个关系:知名网站建设定制选修和所属。学生与课程n:m联系。课程与学生成绩1:m联系。“选修”和“所属”不单独建立实体集。把“学生”中的学号和“课程”中的课程号设为主键,其他的属性设为外键。学生与成绩可通过课程建立联系。

2.3关系模式的数据字典

学生表

数据项名

类型

长度

精度

取值范围

默认值

是否允许为空

KEY

id

char

255

NULL

NO

PRI

name

char

25

NULL

YES

gender

char

25

NULL

YES

class

char

25

NULL

YES

address

char

25

NULL

YES

age

char

25

NULL

YES

Phone number

char

25

NULL

YES

password

char

20

NULL

YES

成绩表

数据项名

类型

长度

精度

取值范围

默认值

是否允许为空

KEY

student_id

char

255

NULL

NO

PRI

class_id

char

255

NULL

NO

PRI

score

char

25

NULL

YES

课程表

数据项名

类型

长度

精度

取值范围

默认值

是否允许为空

KEY

id

char

255

NULL

NO

PRI

name

char

255

NULL

YES

point

char

25

NULL

YES

2.4系统开发工具简介

开发工具:access

2.5数据库与表的建立

学生表:student的创建

  1. sql = """CREATE TABLE IF NOT EXISTS student(
  2. id char(255) NOT NULL,
  3. name char(25) default NULL,
  4. gender char(5) default NULL,
  5. class char (25) default NULL,
  6. address char(25) default NULL,
  7. age char(25) default NULL,
  8. phone number char(25) default NULL,
  9. password char(20) default NULL,
  10. PRIMARY KEY (id)
  11. ) ENGINE = InnoDB
  12. DEFAULT CHARSET = utf8
  13. """
  14. cursor.execute(sql)

Field

Type

Null

Key

Default

id

Char(255)

NO

PRI

NULL

name

Char(25)

YES

NULL

gender

Char(25)

YES

NULL

class

Char(25)

YES

NULL

address

Char(25)

YES

NULL

age

Char(25)

YES

NULL

Phone number

Char(25)

YES

NULL

password

Char(20)

YES

NULL

课程表的创建:class

  1. sql = """CREATE TABLE IF NOT EXISTS class(
  2. id char(255) NOT NULL,
  3. name char(255) default NULL,
  4. point char(25) default NULL,
  5. PRIMARY KEY (id)
  6. ) ENGINE = InnoDB
  7. DEFAULT CHARSET = utf8
  8. """
  9. cursor.execute(sql)

Field

Type

Null

Key

Default

id

Char(255)

NO

PRI

NULL

name

Char(255)

YES

NULL

point

Char(25)

YES

NULL

成绩表的创建:score

  1. sql = """CREATE TABLE IF NOT EXISTS score(
  2. stu_id char(255) NOT NULL,
  3. class_id char(255) NOT NULL,
  4. score char(25) default NULL,
  5. PRIMARY KEY (class_id,student_id)
  6. ) ENGINE = InnoDB
  7. DEFAULT CHARSET = utf8
  8. """
  9. cursor.execute(sql)

Field

Type

Null

Key

Default

student_id

Char(255)

NO

PRI

NULL

class_id

Chat(255)

NO

PRI

NULL

score

Char(25)

YES

NULL

管理员表的创建:admin_k

  1. sql = """CREATE TABLE IF NOT EXISTS admin_login_k(
  2. admin_id char(50) NOT NULL,
  3. admin_pass char(50) default NULL,
  4. PRIMARY KEY (admin_id)
  5. ) ENGINE = InnoDB
  6. DEFAULT CHARSET = utf8
  7. """
  8. cursor.execute(sql)

Field

Type

Null

Key

Default

admin_id

Char(50)

NO

NULL

admin_pass

Char(50)

YES

NULL

2.6用户管理权限的实现

2.6.1 登陆界面

页面主要有Visual Basic代码编写,主界面设计关键代码:

  1. Option Compare Database
  2. Private gl As Boolean
  3. Private Sub Option4_Click()
  4. If Me.Option4.Value = -1 Then
  5. Me.Option8.Value = 0
  6. gl = True
  7. End If
  8. End Sub
  9. Private Sub Option8_Click()
  10. If Me.Option8.Value = -1 Then
  11. Me.Option4.Value = 0
  12. gl = False
  13. End If
  14. End Sub

  1. Private Sub 登录_Click()
  2. If IsNull(Me.Option4.Value) And IsNull(Me.Option8.Value) Then MsgBox "请选择角色后再登录", vbExclamation, vbOKOnly: Exit Sub

  1. If IsNull(UserName) Then
  2.   MsgBox "用户名不能为空,请重新选择!", vbExclamation + vbOKOnly, "提醒您!" '弹出框
  3.   Me.UserName.SetFocus
  4.   Exit Sub

  1. Else
  2. If IsNull(Password) Then
  3.   MsgBox "注意,您忘了输入密码!", vbExclamation + vbOKOnly, "提醒您!" '弹出框
  4.   Me.Password.SetFocus
  5.   Exit Sub
  6. End If

  1. If gl Then
  2.  If DLookup("管理员密码", "管理员", "管理员名称='" & UserName & "'") = [Password] Then
  3.     '验证账号密码
  4.     Me.Visible = False
  5.     Me.Password = Null
  6.     MsgBox "登录成功!", vbExclamation, "提醒您"
  7. StrName = Me.UserName

  

  1. Else
  2.     MsgBox "您输入的密码有误,请重新输入,注意大小写!", vbExclamation + vbOKOnly, "提醒您!"
  3.     Exit Sub
  4.   End If

  '管理员登录

  DoCmd.OpenForm ("管理员系统") '登陆成功,打开管理员系统界面

Else

  '普通用户登录

  If DLookup("密码", "学生", "学号='" & UserName & "'") = [Password] Then

    '验证账号密码

    Me.Visible = False

    Me.Password = Null

    MsgBox "登录成功!", vbExclamation, "提醒您" '登陆成功

StrName = Me.UserName

  Else

    MsgBox "您输入的密码有误,请重新输入,注意大小写!", vbExclamation + vbOKOnly, "提醒您!"

    Exit Sub

  End If

  DoCmd.OpenForm ("学生系统")

End If

'弹出框

Me.Password = Null

Me.Password.SetFocus

End If

End Sub

2.6.2学生系统

Option Compare Database

  1. Private Sub Command1_Click()
  2. On Error GoTo Err_Command1_Click
  3.  Dim stDocName As String
  4.  Dim stLinkCriteria As String
  5.  stDocName = "学生信息查询"
  6.  DoCmd.OpenForm stDocName, , , stLinkCriteria
  7. Exit_Command1_Click:
  8.  Exit Sub
  9. Err_Command1_Click:
  10.  MsgBox Err.Description
  11.  Resume Exit_Command1_Click
  12. End Sub

  1. Private Sub Command2_Click()
  2. On Error GoTo Err_Command1_Click
  3.  Dim stDocName As String
  4.  Dim stLinkCriteria As String
  5.  stDocName = "课程查询"
  6.  DoCmd.OpenForm stDocName, , , stLinkCriteria
  7. Exit_Command1_Click:
  8.  Exit Sub
  9. Err_Command1_Click:
  10.  MsgBox Err.Description
  11.  Resume Exit_Command1_Click
  12. End Sub

  1. Private Sub Command3_Click()
  2. On Error GoTo Err_Command1_Click
  3.  Dim stDocName As String
  4.  Dim stLinkCriteria As String
  5.  stDocName = "成绩查询"
  6.  DoCmd.OpenForm stDocName, , , stLinkCriteria
  7. Exit_Command1_Click:
  8.  Exit Sub
  9. Err_Command1_Click:
  10.  MsgBox Err.Description
  11.  Resume Exit_Command1_Click
  12. End Sub

2.6.3管理员系统

Option Compare Database

  1. Private Sub Command1_Click()
  2. On Error GoTo Err_Command1_Click
  3.  Dim stDocName As String
  4.  Dim stLinkCriteria As String
  5.  stDocName = "学生信息管理"
  6.  DoCmd.OpenForm stDocName, , , stLinkCriteria
  7. Exit_Command1_Click:
  8.  Exit Sub
  9. Err_Command1_Click:
  10.  MsgBox Err.Description
  11.  Resume Exit_Command1_Click
  12. End Sub

  1. Private Sub Command2_Click()
  2. On Error GoTo Err_Command1_Click
  3.  Dim stDocName As String
  4.  Dim stLinkCriteria As String
  5.  stDocName = "成绩管理"
  6.  DoCmd.OpenForm stDocName, , , stLinkCriteria
  7. Exit_Command1_Click:
  8.  Exit Sub
  9. Err_Command1_Click:
  10.  MsgBox Err.Description
  11.  Resume Exit_Command1_Click
  12. End Sub

  1. Private Sub Command3_Click()
  2. On Error GoTo Err_Command1_Click
  3.  Dim stDocName As String
  4.  Dim stLinkCriteria As String
  5.  stDocName = "登录"
  6.  DoCmd.OpenForm stDocName, , , stLinkCriteria
  7. Exit_Command1_Click:
  8.  Exit Sub
  9. Err_Command1_Click:
  10.  MsgBox Err.Description
  11.  Resume Exit_Command1_Click
  12. End Sub
  13. Private Sub Command4_Click()
  14. On Error GoTo Err_Command1_Click
  15.  Dim stDocName As String
  16.  Dim stLinkCriteria As String
  17.  stDocName = "采购员信息管理"
  18.  DoCmd.OpenForm stDocName, , , stLinkCriteria
  19. Exit_Command1_Click:
  20.  Exit Sub
  21. Err_Command1_Click:
  22.  MsgBox Err.Description
  23.  Resume Exit_Command1_Click
  24. End Sub

2.7删除记录

通过宏命令的叠加设计:

 

2.8修改记录

宏命令:

 

2.9增加记录

宏命令:

2.10信息查询

宏命令:

三、总结(经验与不足)

数据库管理系统实现的功能

基本上用所学知识实现了大数据的增删改查,数据比较完整,极易查询,界面清晰,较为简单,操作也相对方便,用户友好度较高界面简洁明了,总体上来说完成度较高,具备了学生信息管理系统的基本功能。

数据库存在的问题

距离真正投入使用还是存在着较大差距

管理员的管理流程和系统过于简单,容易误改学生信息

学生之间也可以互相查看对方信息,私密性较差

网站建设定制开发 软件系统开发定制 定制软件开发 软件开发定制 定制app开发 app开发定制 app开发定制公司 电商商城定制开发 定制小程序开发 定制开发小程序 客户管理系统开发定制 定制网站 定制开发 crm开发定制 开发公司 小程序开发定制 定制软件 收款定制开发 企业网站定制开发 定制化开发 android系统定制开发 定制小程序开发费用 定制设计 专注app软件定制开发 软件开发定制定制 知名网站建设定制 软件定制开发供应商 应用系统定制开发 软件系统定制开发 企业管理系统定制开发 系统定制开发