How should I save a list of int(s) in a web app ?
I am designing a facebook-like app and for every user I need to save the ids of his friends, so a csv in the DB I don’t think is indicated taking into account that a user cam even have 1000 friends and the database field that should contain this list is fixed, the csv may overflow that field.
Should I store these lists in local server files or is the database still the best option?
Many-to-many relationships are typically handled using a separate table.
You then use a JOIN to find out who is friends with a given user