确定关系是否为1NF,无数据 [英] Determining if a relation is 1NF with no data

查看:175
本文介绍了确定关系是否为1NF,无数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有关系

CAR_SALE(Car#, Date_sold, Salesperson#, Commission%, Discount_amt)
Primary Key: {Car#, Salesperson#}
Additional Dependencies: Date_sold -> Discount_amt
                         Salesperson# -> Commission%

,我必须确定它是1NF,2NF还是3NF。我们只得到没有数据的关系模式。我无法确定这是否在1NF中。为了使某项包含在1NF中,该属性不得具有重复的组。在没有实际数据的情况下,没有关系,这是不可能的吗?我是否需要实际数据来确定它是否为1NF?还是会存在主键让我知道不会重复任何属性?

and I have to determine if it is in 1NF, 2NF, or 3NF. We are only given the relation schema with no data. I am having trouble determining if this is in 1NF. In order for something to be in 1NF, it must not have repeating groups for an attribute. Given this relation schema with no actual data, wouldn't it be impossible to tell? Wouldn't I need actual data in order to determine if it would be 1NF? Or would the existence of a primary key let me know that no attributes would be repeated?

我知道2NF,它必须在1NF中,并且所有非键属性都必须取决于主键,对于3NF,它必须位于2NF中,并且没有转换依赖性。

I know for 2NF, it must be in 1NF and all non-key attributes must depend on the primary key, and for 3NF, it must be in 2NF and no translational dependencies.

推荐答案

许多人使用 1NF来表示属性类型的一些模糊概念,所有这些都以某种模糊的方式称为 原子。 Codd最初的意思是规范化,后来的意思是 1NF,意思是没有属性本身就是关系。 atomic的所有其他用法都被混淆了无助的,没有道理的已获接受的智慧,并且一个值是否为 atomic最终在实践中最终取决于它是否不希望作为元组中某个属性的值的部分查询结果。无论哪种情况,您都不能仅通过属性来判断一个关系是否在1NF中。如果告诉您属性的类型,并清除 atomic的标准(Codd给出的:不是关系),则可以告诉您。其他人发现 1NF无益或将其定义为是一种关系。只要确保您了解/听到使用 1NF的含义即可。 (祝您对原子有一个明智的定义。)

Many people use "1NF" to mean some vague notion of the types of attributes all being some vague way called "atomic". Codd originally meant "normalized", later "1NF", to mean having no attributes that were themselves relations. All other uses of "atomic" are confused unhelpful unjustified received wisdom, and whether a value is "atomic" is ultimately in practice whether it has no parts that you want to be the values for some attribute in a tuple in a relation that is a query result. In either case, you can't tell just from the attributes whether a relation is in 1NF. If you are told the types of the attributes, and clear criteria for "atomic" (which Codd gave: not being a relation) then you can tell. Other people find "1NF" unhelpful or define it as "is a relation". Just make sure you find out what is meant when you hear/see "1NF" used. (Good luck with ever getting a sensible definition for "atomic".)

有时人们错误地将重复组用于非原子。 (但是重复组实际上是关系前的非关系数据库中不能出现在关系中的一个概念。)

Sometimes people wrongly use "repeating group" for "non-atomic". (But a repeating group is actually a notion from pre-relational non-relational databases that cannot appear in a relation.)

有时人们含糊其词地困惑地无助地错误地错误地包含了一个关系元组中的属性不能有多个值,这是不可能的,因为根据定义关系在元组中具有一个值。

Sometimes people vaguely confusedly unhelpfully wrongly include that a relation can't have multiple values for an attribute in a tuple, which is not possible anyway, since a relation by definition has one value for an attribute in a tuple.

有时人们模糊地,无助地错误地在其 1NF中错误地包含了一些相似性概念,即没有多个相似属性。

Sometimes people vaguely confusedly unhelpfully wrongly include in their "1NF" that there are not multiple similar attributes, for some notion of similarity.

请参见此答案此答案

这篇关于确定关系是否为1NF,无数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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