'Followers' and efficiency

后端 未结 4 1456
别那么骄傲
别那么骄傲 2020-12-28 09:57

I am designing an app that would involve users \'following\' each other\'s activity, in the twitter sense, but I am not very experienced with database/query design/efficienc

4条回答
  •  独厮守ぢ
    2020-12-28 10:59

    Pretty simple and easy to do with full normalisation. If you have a table of users, each with a unique ID, you would have a TABLE_FOLLOWERS table with the columns, USERID and FOLLOWERID which would describe all the followers for each user as a one to one to many relationship.

    Even with millions of assosciations on a half decent database server this will perform well and fast as long as you are using a good database (IE, not MS-Access).

提交回复
热议问题