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

查看:37
本文介绍了当 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?

推荐答案

A 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天全站免登陆