Good day. Here I thought, I wonder how it is organized in social. networks (facebook, VK) DB connections between users?
It would seem, everything is simple: created the base of friendship , in it 3 fields
|user_id|recipient_id|status|
Whereuser_id - user idrecipient_id - profile id that has anything to do with user user_id
And status , where you can put the "relationship" of these 2 users (0-submitted a friend request, waiting for confirmation, 1-friend, 2 blacklisted).
It would seem, and everything, but it seems to me completely irrational, since the growth of data in the database can be calculated approximately by the formula
r = x^2 , where r - number of lines, and Ń… - number of users. Absolutely irrational approach.
And how would you do?
The fact is that there is a need to do something similar in function, but I am afraid that Muscle will hang from the load.
Thanks in advance for the help and your options :)