I've run into bit of an issue on implementing a count
system in my project.
I have a system where users can like a post
. Should I keep a count of it in the same table like
or should I remove the like_count
column from the post table.
My concern if I have like_count
column in the post table is -- frequent update of the value.
If I choose not to add a like_count
column in the post table, I'd have to use count()
frequently to display the details.
I've to design a data model for thousands of users.
So which model is the right way to implement?
P.S: Please ignore the data types of the columns. I just did a quick version of it to post it here.