更新时间:2023-02-03 18:16:48
如果我理解你的问题你不需要一张桌子,你需要几个。每个表应包含不同的实体,例如
- 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.