It is recommended to create an association table when there is a many-to-many relationship between two entities.
Whenever there is a many-to-many relationship between two entities, it is recommended to create an association table to link them. This association table acts as a bridge between the two entities and stores the primary keys of both tables, creating a relationship between them.
By creating an association table, we can effectively handle the relationships between the entities and avoid data redundancy. It allows for efficient querying and provides flexibility when working with the data. Additionally, it helps maintain data integrity by enforcing referential integrity constraints.
Therefore, the answer to the question is 1) Yes, we should create an association table when there is a many-to-many relationship between two entities.