学生成绩单管理... [英] student marksheet managment......

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

问题描述

先生,我有100个学生..每个学生每年都有8个科目..学生学习4年..所以我如何在总成绩中找到一个单身学生... 100个学生中的相同过程...请告诉我先生.........

sir i have 100 student .. every student have 8 subject in every year..the student study 4 year .. so how i find one single student over all total mark... this same process in 100 student... please tell me sir.........

推荐答案

这里有很浓的家庭作业味道,所以您不会得到任何代码!
如何执行此操作将取决于您的数据库设计:您可以在单个表中的单个行中执行此操作:
There is a strong smell of homework here, so you will get no code!
How you do this will depend on your database design: you could do this with a single row in a single table:
StudentInfo, year1Data, year2Data, year3Data, year4Data

,其中yearNData包含8个主题标记.
那么查询就非常简单:只需使用SQL SUM函数将所有主题标记加在一起即可.
但是,这是一种笨拙的方法:最好使用一个学生表,一个引用学生ID的Year表和一个引用年表的Marks表.这使查询更加复杂,但提供了更大的灵活性.

或者,您也可以在中间的某个地方做.

您有什么样的计划?

where each yearNData consisted of 8 subject marks.
Then the query is pretty simple: just use the SQL SUM function to add all the subject marks together.
That is a clumsy way to do it though: You would probably be better off with a Student table, a Year Table which refers to the student ID, and a Marks Table which refers to the year table. That makes teh query more complex, but provides more flexibility.

Or you could do it somewhere in the middle.

What kind of scheme do you have?


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

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