Associative Entity
- Renee Li
- Nov 24
- 1 min read
I'm beginning to understand the relationships! When dealing with one-to-one or one-to-many relationships between two entities, there's no need for excessive concern. We can simply list the two entities and any attributes we can think of, as each attribute will belong to one of the entities. We don't need to worry much about associative entities because any new attributes resulting from interactions between the two entities can be included in either entity. We just need to list the one-to-many or one-to-one relationships and include all possible attributes, using each entity's primary key as a foreign key to reference each other's table. However, when the relationship is many-to-many, two tables alone aren't sufficient to represent a unique identity. In such cases, we need a third table to ensure uniqueness and identifiability. This is why we have an associative table that uses foreign keys to reference the two entities and includes new attributes resulting from their interaction.



Comments