I need to create a relationship n: m in mysql, follow my example:
I have a table named empresas
and another representantes
. A company can have more than one representative, and one representative can belong to more than one company. In this case, the best relationship that fits into this problem is the n: m relationship.
In the n: m relationship, there is a third table joining the rep and a company. How can I make an INSERT and UPDATE in this third table recursively, without duplicating the records, knowing that when registering a company, I have several representatives, and vice versa?