“Follow user” database table design

后端 未结 2 962
广开言路
广开言路 2020-12-24 15:24

I\'m trying to determine the best table design for a \"follow/unfollow user\" feature, similar to Twitter (edit: I\'m not making a Twitter-like application.

2条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-24 15:47

    I would suggest you make follower and following together the primary key. There is no need for a seperate id field.

提交回复
热议问题