当1NF表没有复合候选键时,它在2NF中吗? [英] when a 1NF table has no composite candidate keys is it in 2NF?

查看:113
本文介绍了当1NF表没有复合候选键时,它在2NF中吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以肯定地说,当1NF表中没有复合候选键(主键包含多于一列)时,该表会自动处于2NF中吗?

Is it safe to say, when a 1NF table has no composite candidate keys (primary keys consisting of more than one column), the table is automatically in 2NF?

当表的主键中只有一个列时,表可以破坏2NF吗?

Can a table voilate 2NF, when it has only one column in its primary key?

推荐答案

一个relvar R位于2NF中只要没有非平凡的FD,A-> B都由R满足,其中B是非素数,并且A是R的某些候选关键字的适当子集。

A relvar R, is in 2NF as long as there is no non-trivial FD, A->B, satisfied by R where B is nonprime and where A is a proper subset of some candidate key of R.

您首先必须考虑所有候选键。如果所有候选键都碰巧是单个属性键,则这些键中唯一可能的正确子集是{}(空集)。对空集的依赖性不太可能无意间出现,因为它们通常是显而易见的和不必要的。但是,即使只有一个简单的键,也完全可以实现这种依赖关系。

You first have to consider all the candidate keys. If it is the case that all the candidate keys happen to be single attribute keys then the only possible proper subset of any of those keys is {} (the empty set). Dependencies on the empty set are unlikely to arise unintentionally because they are usually obvious and unnecessary. Such dependencies are perfectly possible however, even where there is only a single, simple key.

这篇关于当1NF表没有复合候选键时,它在2NF中吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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