📞 0339-0387701 (WhatsApp) Contact

« Back to Database & Data Handling (NCCIA)

In a social network, a User who follows another User is best modelled as what?

A. A relationship between User and Post
B. A self-referencing many-to-many relationship, usually with a junction table such as Follow ✅
C. A one-to-many relationship with a single foreign key
D. A one-to-one relationship

Correct Answer: B. A self-referencing many-to-many relationship, usually with a junction table such as Follow

Explanation

Each user can follow many users and be followed by many, so the recursive M:N link needs a junction table with two foreign keys to User.