ER图中的关系属性 [英] relationship attributes in ER diagrams

查看:757
本文介绍了ER图中的关系属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

实体关系图中的关系可以有自己的关键属性吗?
如果没有,那么我们必须使用这个键来创建一个单独的实体吗?

Can a relationship in an entity relationship diagram have a key attribute of its own? If not, then do we have to make a separate entity with this key ?

推荐答案

这将有一个自己的密钥将是一个多对多的关系。这种关系的关键是自然地将外键与其每个父亲的组合。

The only kind of relationship which would have its own key would be a many-to-many relationship. The key of this relationship is naturally the combination of the foreign keys to each of its parents.

如果有关系的其他属性,那么它不是一个关系

If there are other attributes of the relationship then it isn't a relationship at all, it's an entity in its own right.

与一对多(和一对一)关系相关联的键位于子表中作为外部

The keys associated with one-to-many (and one-to-one) relationships reside in the child table as foreign keys.

这篇关于ER图中的关系属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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