views:

7

answers:

0

I have a site where a person can follow someone and also be followed. I am not sure how to map this for my specific scenario. My database schema is currently like this

A Person table with a PersonID, Name etc. A PersonFollow table with PersonFollowID (Identity), PersonID, FollowID, Timestamp. The PersonID represents a user while the FollowID represents the ID of who they are following.

I need to be able to return a list of People who a specific person follows and also be able to return a list of who that person's followers are. What is the most efficient way to map this?

related questions