My FeedDiscussionsHeadless CMS
New
Sign in
Log inSign up
Learn more about Hashnode Headless CMSHashnode Headless CMS
Collaborate seamlessly with Hashnode Headless CMS for Enterprise.
Upgrade ✨Learn more

Database Design: Multiple Pivot Table VS Single Pivot Table with WHERE clauses

John S.A.'s photo
John S.A.
·Jun 4, 2018

I planning to creating a simple social network but confused about the database design

Multi Pivot

user_friends

user_id

friend_id

user_follows

user_id

follow_id

status_mentions

status_id
user_id

status_likes

status_id
user_id

Single Pivot

user_selves

user_id
self_id
type_id

status_users

user_id
status_id
type_id

type_id will be filled by small integer, in user_selves 1 = friend, 2 = follow, status_users 1 = mention, 2 = likes

what are the pros and cons of that two db design?