To simplify understanding: there is a table with users of one social. network. The parser complements the table with friends already existing in the database by users.
Help build a database structure, so that users leave in one table. And at the same time unload, if necessary, the relationship between the participants.
In this matter I lack the theory, the practice is polished. I would be grateful for any helpful comment.