title: Suggestion on DB Design to log user activity in a system
body: <p>I would like to ask a for an advice for a good database design to log user activity.</p>
  
  <p>Currently I am implementing such approach for a simple website where user can post/edit/delete an article on the website.</p>
  
  <p><strong>Table Logbook</strong></p>
  
  <pre><code>- log_id
  - log_change[Enum: new/edit/remove]
  - log_date
  - member_id
  - post_id
  </code></pre>
  
  <p><strong>Table Post</strong></p>
  
  <pre><code>- post_id
  - post_title
  - etc....
  </code></pre>
  
  <p><strong>Table Member</strong></p>
  
  <pre><code>- member_id
  - member_username
  - member_pwd
  - etc..
  </code></pre>
  
  <p>Using this table, everytime user makes a new post (or edit/remove) of an article it will be logged on the Logbook (along with the time when it happens).</p>
  
  <p>However, what if I am dealing with a larger system where not only user can post an article but do other things such as login/logout (from the system), make a purchase (transaction).</p>
  
  <p>Should I go for different table for each module?. For example, if the system has modules like Posting article, E-commerce, etc.. hence I would have log tables for:</p>
  
  <ol>
  <li>Article Log</li>
  <li>E-Commerce Log</li>
  </ol>
  
  <p>Where each table will log activity in each corresponding module.</p>