I would like to know how to solve many - to many relationship data.

I have a client and a company table. A client can be an employee or an employer of the company. The employer can associate to more than one company. A company can have many owners or employees.

In this scenario, how do I solve this many to many relationship between these two tables.

Both of the so far have their own unique ID. In this case what I can do to solve this scenario. Does creating another table for both client and company tables make sense?

No idea to this problem.

Thank you.. hope anyone can help me with this. ...

9 Years
Discussion Span
Last Post by Ramy Mahrous

Break the many-to-many relationship into one-to-many and many-to-one
Which means?
create a bridge table Employee_Company (EmployeeID int #, CompanyID int #, Salary float, .....)
Bridge table properties: has composed primary keys (in your case Employee and Company)
- has shared properties which illogical to included in the entities it ties with (in your case salary, work_period, title, etc...)

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.