title: How to limit users in login system to one vote per post?
body: <p>How does Facebook limit one like per person per post? I'm implementing something similar for a site but I'm not sure how to approach this correctly. Should I create a table for every single post and just have rows recording which users have voted on a particular post?  </p>
  
  <p>Is creating as many tables as you have posts bad? Is there a better way to do this?  </p>
  
  <p>A better example is how Stack Overflow keeps track of which answers and questions every user has voted on. When you go to a question you've already voted on, it shows your vote. How does it do this efficiently?</p>
  
  <p>I've already tried researching this and I didn't find anything that explains a way to do this.</p>