管理学生的成绩? [英] Manage the marks of students?

查看:63
本文介绍了管理学生的成绩?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有使用Laravel建立大学的系统,以及带有科目名称的学生成绩(第一和第二学期)的系统.

I have system for my university build with Laravel, for students' marks (first and second semester) with names of subjects.

我创建了三个表:

  • 学生
  • 部门(与学生有关系)
  • 阶段(与学生有关系)

我的问题是成绩表,如何为每个学生设计带有主题的成绩表,即成绩表(科目-成绩)

My problem is with marks table, how can I design the table marks with subject for every single student, means table (subject - mark)

我创建了这样的标记表:

I had created marks table like that:

id - student_id - marks ([ 'math': 'A' ])

该设计正确吗?如果不是这样的最佳设计是什么?

Is that design correct? If not what is the best design for something like that?

推荐答案

尝试这样

student_id,subject_1_mark,subject_2_mark,....

这可能不是最佳答案

祝你好运.

更新后的答案

user_id | maths | art | bio |
_____________________________
1       | 62    | 50  | 40  |
2       | 80    | 40  | 20  |

another way 

subjects table

id | subject_name |
___________________
1  | science      |
2  | maths        |

marks_table 

id | user_id | subject_id | mark
________________________________
1  | 2       | 1          | 60
2  | 2       | 2          | 40


这篇关于管理学生的成绩?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆