关联实体和关联关系属性之间的区别?

Difference between associative entity and associative relationship attribute?

关联实体和关联关系属性有什么区别?在我的书《现代数据库管理》(Hoffer,第 11 版)中,作者指出两者之间存在差异。虽然,它并没有真正解释为什么会有差异,相反,它只是举例说明它们的不同之处。

据我所知,具有与之关联的 单个 属性的关系是关联关系属性,并用虚线表示为圆角矩形该矩形内的属性。而关联实体 不止一个 描述关系的属性。两者都只能用于 ER 图表中的多对多关系。我的思维过程是否正确?

编辑 - 另外,我忘了说,对于关联实体,它们也有一个属性,即唯一标识符,至少,我是这么认为的。

associative entity 是 table,它以多对多关系关联另外两个 table。

关联关系属性是由于多对多关系而存在的关联实体的属性。

举个例子。假设我们有以下 tables.

User
----
User ID
User Login Name
User Name
User Password

Permission
----------
Permission ID
Permission Name
Permission Description

好的,我们在 User 和 Permission 之间建立了多对多的关系。一个用户可以拥有多个权限,一个权限可以在多个用户之间共享。

因此,我们创建一个关联实体。

UserPermission
--------------
User ID
Permission ID
Permission Granted Time Stamp

权限授予时间戳是关联关系属性。它不适合用户 table 或权限 table。这是协会的属性。

在 ER 图表中,M:N 关系可以具有描述关系的关联实体或单个关联属性。不同之处在于,关联实体必须具有唯一标识符,而关联属性则没有。根据这本书,关联实体必须具有:

1-all the relationships for the participating entity types are M:N relationships 

2-the resulting associative entity type has independent meaning to the end user and has an identifier 

3- the entity has one or more attributes 

4-the entity participates in 1 or more relationships independent of the entities related in the associated relationship.