如何为Subject创建表 [英] How to create a table for Subject

查看:196
本文介绍了如何为Subject创建表的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在建立一个学校管理系统,但我被锁定在某个地方。我不知道如何分别输入每个学生的姓名,科目和分数

我认为问题全部来自数据库。

我有一张包含这些字段的表格

(姓名,班级,科目,考试和班级成绩)。

假设我先插入

杰克的名字,他的班级,科目(英语),考试成绩,班级成绩。



其次,当我尝试为数学插入另一个分数时,它会改变我插入数学的第一个科目。



我需要你的帮助

解决方案

如果我理解你的问题你不需要一张桌子,你需要几个。每个表应包含不同的实体,例如

- Person,包含名称,类等

- 包含名称等的主题

- 等级包含有关个人等级的信息等等

我建议通过数据库规范化 - 维基百科,免费的百科全书 [创建表格之前[ ^ ]。

Am creating a school management system, but am locked somewhere. I don't know how to enter every students' name,subject and its scores separately
And I think the problem is all from the database.
I have a table with these fields
(Name, Class, Subject, examscore and class score).
Let's say I will first insert
Jack's name, his class, Subject (English), his exams score, class score.

Secondly, when I try to insert another scores for Mathematics, it will change the first subject i inserted to Mathematics.

I need your help

解决方案

If I understand your question correctly you don't need one table, you need several. Each table should contain different entities, for example
- Person, containing name, class etc
- Subject containing name and so on
- Grade containing information about individual grades for persons and so on
I suggest going through Database normalization - Wikipedia, the free encyclopedia[^] before creating the tables.


这篇关于如何为Subject创建表的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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