+ 2

How to store likes and dislikes of posts in database? or what is the efficient way to store it?

In sql DB i can store it as like_dislikes user-id | post_id | like | dislike | -------------------------- 1 |2 | 1 | 0 | __________________________| 1 | 3 | 0 | 1 | _______________________ ___| LIKE=1 Dislike=0 same user with the user_id = 1 has liked and disliked post's 2 and 3 or is there any better way ?

8th Nov 2020, 2:30 PM
Vijay(v-staršŸŒŸ)
Vijay(v-staršŸŒŸ) - avatar
2 Answers
+ 3
15th Nov 2020, 6:03 PM
Vijay(v-staršŸŒŸ)
Vijay(v-staršŸŒŸ) - avatar