Suppose there are two entities called Employee and Campaign. One employee can work on many campaigns. And one campaign can have many employees. I already know this is a many to many relationship.
And when drawing the ER diagram (in Chen notation), the relationship is symbolized by a diamond shape. But there is a separate symbol for associative entities, which symbolizes a many to many relationship between two entities.
1) So should I use the diamond shape or the associative entity shape (diamond inside a square) when drawing many to many relationships in er diagram in Chen's notation?
2) Do they both mean the same thing or different things?
3) If they are two separate things, how can I identify when to use which?
A Business Data Model (BDM) associative entity represents an association between two fundamental entities that has a potential many-to-many cardinality or that holds some attributes.
An associative entity is derived from the BDM associative entities by applying transformation rules based on the data load and the workload. Associative entities allow the grouping together of associations that have the same right and left parent, avoiding changes when new kinds of association are defined.
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.
Associative entities are used when you need a relationship to be involved in a relationship.
For example:
For a normal many-to-many relationship between Student
and Course
, we would use just a diamond. However, if we want to associate Enrollment
with Teacher
, we can turn Enrollment
into an associative entity.
Phyiscally, our database looks like this:
Making Enrollment
a ternary relationship in which the Teacher
is an optional role would have much the same meaning (except it would be denormalized, having a nullable role).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With