多值属性可以有主键吗? [英] Can a multivalued attribute have a primary key?

查看:456
本文介绍了多值属性可以有主键吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

函数依赖是一个属性,它们的值是由另一个属性以一种独特的方式确定的。给定一个多值属性可以依赖于一个主键?

Functional dependencies are the attributes that their values are determined in a unique way by another attribute.Given that, can a multivalued attribute be dependent upon a primary key?

推荐答案


  1. FD是属性,它们的值以另一个属性的唯一方式确定是无法理解的。

  1. "FDs are the attributes that their values are determined in a unique way by another attribute" is unintelligible. Find a way to say it correctly or how can you understand it?

属性(或一组属性)在功能上由设置

An attribute (or set of attributes) is functionally determined by a set of attributes.

关系中没有多值属性这样的东西。元组每个属性名称都有 属性值。 (也许你的意思是,一组属性正在被确定?也许你的意思是,一个多值依赖?)如果你有一个属性,你考虑包含多个部分,即你想一般查询关于不使用具有其类型的参数的运算符的部分,则通常好的设计具有具有这些部分的属性的单独的表。但这不是通过规范化来解决。 任何值可以被认为具有多个方面的多个部分,它是您的应用程序/查询,确定什么时候停止制作表的属性是其他值的部分的值,只有一个属性为值。类似地,如果你有一堆属性扮演类似的角色(通​​常有相似的名称),那么通常是一个好的设计有一个单独的表只有一个属性的角色。但这不是通过规范化来解决。

There is no such thing as a "multivalued attribute" in a relation. A tuple has an attribute value for each attribute name. (Maybe you mean, a set of attributes is being determined? Maybe you mean, a multi-valued dependency?) If you have an attribute that you consider to contain multiple parts, ie you want to generically query about the parts without using operators with parameters of their types, then it is usually good design to have a separate table with attributes for those parts. But that's not addressed by normalization. Any value can be considered to have multiple parts in multiple ways and it is your application/queries that determine when you stop making tables whose attributes are the values of parts of other values and just have an attribute for a value. Similarly, if you have a bunch of attributes that play a similar role (often with similar names) then it is usually good design to have a separate table with just one attribute for the role. But that's not addressed by normalization.

候选键对FD,MVD,JD和规范化都有影响。 PKs不。你可以选择一个CK作为PK,但它的primariness与关系模型无关。它可能与一些信息建模方法或产品相关。

Candidate keys matter to FDs, MVDs, JDs and normalization. PKs don't. You can pick one CK as "the PK" but its primariness is irrelevant to the relational model. It might be relevant to some information modeling method or product.

超级键是确定每一列的列集合。由于每组属性总是确定其中的属性,所以超级键是确定每隔一列的列的集合。 CK是不包含较小超级密钥的超级密钥。 (所以CK是唯一的列集合,但不包含较小的唯一列)

Superkeys are sets of columns that determine every column. Since every set of attributes always determines the attributes in it, superkeys are sets of columns that determine every other column. CKs are superkeys that contain no smaller superkey. (So CKs are sets of columns that are unique but contain no smaller set of columns that are unique.)

em>所有的CK,直到找到所有的FD。但你可能知道一个特定的属性集是唯一的,没有更小的唯一集,所以你知道它是一个CK,你可以称它为PK。 (例如,可以有多行的关系变量中的id属性。)

You don't know all the CKs until you find all the FDs. But you might know that a particular set of attributes is unique and has no smaller unique set, so that you know that it is a CK and you can call it "the PK". (Eg an id attribute in a relation variable that can have more than one row.)




可以多值属性取决于主键?

can a multivalued attribute be dependent upon a primary key?




  1. 取决于CK的定义的每个CK。所以每个属性都依赖于每个PK的PK定义(但你必须澄清你的意思是多值属性和依赖。)

这篇关于多值属性可以有主键吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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