a 学生选择课程表。
studentnumber name age selected course credit
1 tom 23 math 5
2 jim 20 computer 4
........
如果该表适合2NF,为什么和如何纠正。 谢谢。
a 学生选择课程表。
studentnumber name age selected course credit
1 tom 23 math 5
2 jim 20 computer 4
........
如果该表适合2NF,为什么和如何纠正。 谢谢。
它不是2个NF。 这是:
Students:
studentnumber name age
1 tom 23
2 jim 20
课程:
coursenumber name credit
1 math 5
2 computer 4
Student_课程:
studentnumber coursenumber
1 1
2 2
因为你想要打破并非完全依赖原候选人钥匙(例如课程和学生人数)的属性。 赛义布仅部分依靠外国候选人的钥匙(例如,信贷依赖课程,而不是学生)。 年龄和姓名取决于学生,但不是课程。 对于每个部分受抚养人,你创建了一个新表格,使法尔的属性完全取决于新的候选人/主要钥匙。
样本中没有足够的数据来说明所有决定因素。
从我们对学生和课程的了解来看,学生人数决定了学生的姓名和年龄,而且选定课程也决定了信贷。 假设(人数,选定课程)是表上的关键候选人,也是合理的。 这都是根据每个人以往在学生和课程方面的经验进行的。
另一项答复提供了正确的解决办法,但采用新的数据项目,即“序号”对于将数据输入2NF并非绝对必要,条件是没有两个课程可以有相同的“选修课程”。 然而,发明课程数目可能是一个好的想法。
$db_user="root"; $db_host="localhost"; $db_password="root"; $db_name = "fayer"; $conn = mysqli_connect($db_host,$db_user,$db_password,$db_name) or die ("couldn t connect to server"); // perform query ...
I am in the early stages of developing a database-driven system and the largest part of the system revolves around an inheritance type of relationship. There is a parent entity with about 10 columns ...
I m writing a Java web app in my free time to learn more about development. I m using the Stripes framework and eventually intend to use hibernate and MySQL For the moment, whilst creating the pages ...
Does anybody know if it is possible to move some (not all) users from one ASP.NET membership database to another? (for the purposes of migrating some users to another database on another machine, but ...
Is it because of size? By the way, what is the limit of the size?
I am trying to join two tables that reside in two different databases. Every time, I try to join I get the following error: An association from the table xxx refers to an unmapped class. If the ...
For example, I have a table, and there is a column named Tags . I want to know if value programming exists in this column. How can I do this in ADO.NET? I did this: OleDbCommand cmd = new ...
I m trying to migrate one of my PHP projects to Doctrine. I ve never used it before so there are a few things I don t understand. In my current code, I have a class similar to this: class ...