Approach to design database tables
<p>I am new here as well as new in coding. I always get confused when it comes to database designing. Let me try to explain this.</p>

<p>If I need to create a functionality like this (Stackoverflow) website, More specific If I just want simple Question (posting, upvote, downvote) and Answer(posting, upvote, downvote) feature in my website I could follow two approaches.</p>

<blockquote>
  <p>First</p>
</blockquote>

<ul>
<li>create a table <code>question</code> in which I will save question.</li>
<li>create a table <code>votes</code> in which I will save votes(up and down).</li>
<li>To fetch a question will need to join these two table and get the question and there votes(up and down)  </li>
</ul>

<blockquote>
  <p>Second</p>
</blockquote>

<ul>
<li><p>Create a table <code>question</code> in which I will save question and <strong>votes count(tow more column to store count up and down votes)</strong></p></li>
<li><p>Create a table <code>votes</code> in which I will save votes(up and down).</p></li>
<li>This time we can get the data from one tablw without <code>join</code>.</li>
</ul>

<p>I always want to know which one I should use. </p>

<p><strong>I know that in first approach we need to put more joins if we add more feature like (Share,View,Answer,etc).</strong>  </p>

<p><strong>And if i used second approach we need to take care of consistency and we also need to insert more times as in first approach.</strong> </p>

<p>I don't know someone who can answer this. That's why i am asking my question here.</p>

<p>Any help would be appreciated, Thanks.  </p>