6

What is the difference between an associative entity and an associative relationship attribute? In my book titled, Modern Database Management (Hoffer, 11th edition), the author states that there is a difference between the two. Though, it doesn't really explain why there's a difference, instead, it just gives examples of how they're different.

From what I gather, a relationship that has a single attribute associated with it is an associative relationship attribute and is denoted with a dashed line to a rounded-corner rectangle with that attribute inside that rectangle. Whereas an associative entity is more than one attribute that describe the relationship. Both can only be used for many-to-many relationships in ER diagramming. Is my thought process correct?

Edit - Also, I forgot to mention, with associative entities, they also have an attribute that is an unique identifier, at least, this is what I think.

rj2700
  • 1,630
  • 6
  • 26
  • 48

2 Answers2

23

An associative entity is the table that associates two other tables in a many to many relationship.

An associative relationship attribute is an attribute of the associative entity that exists because of the many to many relationship.

Here's an example. Let's suppose we have the following tables.

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

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

Ok, we have a many to many relationship between User and Permission. A user can have more than one permission, and a permission can be shared between many users.

So, we create an associative entity.

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

The permission granted time stamp is an associative relationship attribute. It would not fit in the User table nor the Permission table. It's an attribute of the association.

Gilbert Le Blanc
  • 48,182
  • 6
  • 65
  • 110
  • Nice explanation! I never imagined that these terms have their own names. To me this is just a relationship table with rows and columns. – inf3rno Mar 06 '15 at 20:02
  • What's stopping me from saying Permission Granted Time Stamp is an attribute that describes the relationship? In other words (and just like the book displays it), you can also have an attribute on its own. So from your example, Permission Granted Time Stamp is an attribute that describes the relationship rather than being an attribute within the associative entity (that also describes the relationship). – rj2700 Mar 06 '15 at 20:06
  • 2
    @user1342086: I wouldn't use the word "describes". I'd say "exists as a result of". I'm not sure what you're trying to say. The permission granted time stamp value exists as a result of the relationship. Therefore, it's stored in the associative entity, associative table, or junction table. – Gilbert Le Blanc Mar 06 '15 at 20:10
4

In ER diagramming, M:N relationships can have associative entities OR single associative attributes that describe the relationship. The difference is, associative entities must have a unique identifier and associative attributes don't. According to the book, an associative entity must have:

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.
rj2700
  • 1,630
  • 6
  • 26
  • 48