![]() |
| ||
| Many to many relationship 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. ... |
| ||
| Re: Many to many relationship 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...) |
| All times are GMT -4. The time now is 6:53 pm. |
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC