0

I’m trying to come up with a MySQL database schema to support a feature to store users following other users. I see two approaches:

1st approach) have a users_following table with two columns: user_id and follower_id. Problem I see with this approach is for popular users with many followers, it would create many records in the table.

Alternative approach) have the users_following to store user_id and follower_ids, where the  follower_ids store the followers id in a list (comma separated).

Is there any problem with the alternative approach above?

UPDATE: For this feature, I do not need to query by the individual followers. The way this table will be used is the app will query for the user, then grab the followers and run some logic to it.

user2345093
  • 623
  • 6
  • 13

0 Answers0