I have 2 tables one is user
and another is company
. Both have the following columns common while other columns are different.
id email name
1 first@email.com First user
2 second@email.com Second User
3 third@email.com Third User
Now a user can follow many companies but a company does not follow back user. Company should have data with users who follow them and a user should also store the companies they are following.
What is the simplest and optimal to make this happen on MySQL? Either should I create separate table for it or just add a column on existing tables with array of followers. Please answer assuming I have working level of knowledge on PHP and MySQL.