Database Design: Did you like the table?

Interestingly,
many sites have the ability to love / dislike the message.
even here, of course, on stackoverflow.

so technically this is a big table with sympathy?

user_id    post_id

user_id - who voted
post_id - which post is this

is it all about?
big table? Is there something more efficient / complex?

+5
source share
2 answers

He has the most basic level, yes, that all this is.

But then it begins to expand, trying to answer questions such as:

  • How much did the user like this post?
  • When did they like the post?
  • How did they find the message?
  • Did they comment on the message?
  • /,

.

+5

, . COUNT() , .

, , , COUNT(), COUNT().

, , .

, , .. , , , .

+1
source

All Articles