database 关系类型、程度、基数、可选性术语混淆

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/27242017/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-08 07:51:04  来源:igfitidea点击:

relationship type,degree, cardinality, optionality terms confusion

databasedatabase-design

提问by mhrzn

I currently studying database i've seen degreeand cardinalityuses as same term, or in some other degree is defined as no. of entities involved in a relationship and further catogories as unary, binary and trenary.

我目前正在研究数据库,我已经看到度数基数用作同一个术语,或者在其他程度上被定义为否。关系中涉及的实体的数量以及进一步分类为一元、二元和三元。

Some placed degree is defined as The degree of a relationship type concerns the number of entities within each entity type that can be linked by a given relationship type.

某些放置程度定义为 关系类型的程度涉及每个实体类型中可以由给定关系类型链接的实体数量。

Cardinality is minimum and maximun number of entity occurrence associated with one occurrence of the related entity

基数是与相关实体的一次出现相关联的实体出现的最小和最大数量

cardinality types as 1 to 1, 1 to many, many to many. or min and max cardinality.

基数类型为1 to 1, 1 to many, many to many。或最小和最大基数。

Min degree is optionality and maximum degree is cardinalty.

最小度数是可选性,最大度数是基数。

what is the difference between degree and cardinaltiy ?

degree 和 cardinaltiy 和有什么不一样?

In another context cardinality is a number of rows in table and degree is a number of columns.

在另一个上下文中,基数是表中的行数,度数是列数。

So what i'm i suppose to write if question is asked "Define cardinality ?".

所以如果问“定义基数?”我想写什么。

Can somebody explain ?

有人可以解释一下吗?

回答by madu

Ok here is the explanation

好的,这是解释

1.Degree. This is the number of entities involved in the relationship and it is usually 2 (binary relationship) however Unary and higher degree relationships can be exists.

1.学位。这是关系中涉及的实体数量,通常为 2(二元关系),但可以存在一元和更高级别的关系。

2.Cardinality. This specifies the number of each entity that is involved in the relationship there are 3 types of cardinality for binary relationships

2.基数。这指定了关系中涉及的每个实体的数量二元关系有 3 种类型的基数

  • one to one (1:1)
  • one to many (1:n)
  • many to many (n:m)
  • 一对一 (1:1)
  • 一对多 (1:n)
  • 多对多 (n:m)

hope this will clear your mind. Please communicate for more information

希望这会让你头脑清醒。请联系以获取更多信息

回答by wendykcoding

To add to the first answer: Simply

添加到第一个答案:简单

Degree of a Relation - Number of attributes in a relation Cardinality of a Relation - Number of tuples in a relation.

关系的度数 - 关系中的属性数 关系的基数 - 关系中的元组数。

Can't post the image to show you but you can check out this book to read up more and get a better picture. Also there is Connolly and Begg - Database Systems, 4th Edition Reference:

无法张贴图片向您展示,但您可以查看这本书以阅读更多内容并获得更好的图片。还有 Connolly 和 Begg - 数据库系统,第 4 版参考:

Elmasri, R., Navathe, S.B., 2011. Fundamentals of Database Systems. 6th ed. United States of America: Pearson.
Elmasri, R., Navathe, SB, 2011.数据库系统基础。第 6 版。美国:皮尔逊。

回答by isharailanga

Degree of a Relationship : The number of participating entities in a relationship. This can be unary, binary, ternary, quaternary, etc

关系度:关系中参与实体的数量。这可以是一元、二元、三元、四元等

Cardinality : The number of relationship instances an entity can participate in. Ex: 1:1, 1:Many, Many:N

Cardinality:实体可以参与的关系实例的数量。例如:1:1、1:Many、Many:N

(Min,Max) notation : Minimum represents the participation constraints while Maximum stands for the cardinality ratio.

(Min,Max) 符号:Minimum 代表参与约束,Maximum 代表基数比。

Degree of a relation : Number of columns(attributes) in a relation(table).

关系度:关系(表)中的列数(属性)。

回答by user1439322

Degree- number of attributes (columns) in a relation (table)

度数- 关系(表)中的属性(列)数

Cardinality- number of tuples (rows) present in a table

基数- 表中存在的元组(行)数

See thisfor more details.

有关更多详细信息,请参阅内容。