[英]Database Table Normalization
Table 1
id Student
1 Ali
2 Akram
3 Aamir
4 Adeel
5 Aun
Table 2
id Course
1 English
2 Urdu
3 Maths
4 Physics
5 Chemistry
Table 3
id stu_id course_id
1 1 1
2 1 2
3 2 1
4 2 5
5 5 1
Q1: Are these tables normalized ? 问题1:这些表格是否已标准化?
Q2: Help me to remove duplicates from table 3, suppose if table 2 have 1000 courses, and student id 1 and 2 are enrolled in all courses, table 3 will be very large because of 2000 entries , is there any way to reduce these ? 问题2:请帮助我从表3中删除重复项,假设表2中有1000门课程,并且所有课程中都注册了学生ID 1和2,表3由于有2000个条目而将很大,有什么办法可以减少这些?
Regards 问候
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.