title: Best practices to enable/disable/delete database rows and its references?
body: <p>What are the best practices for handling deletion or enabling/deletion of rows and its referenced tables?</p>
  
  <p>For instance, assume I have a very simple kind of 'forum' app. </p>
  
  <p>I have a table <code>users</code> that contains my webapp accounts and <code>threads</code> that contains threads users create, and a table <code>comments</code> that contains comments users comment on threads.</p>
  
  <p>Now, say that at the moment of the registration I want to verify a user's email before activating its account. What it the best way to do this? What are best practices? Maybe through a view that gives back only the rows with a field <code>is_active=true</code>? Using 2 separated tables like <code>pre_users</code> (that contains users still to be verified) and <code>users</code> (the verified ones)?</p>
  
  <p>Similarly, how would you handle a user that wants to suspend its account? And its threads and comments? Would you add another flag <code>is_suspended</code>, and update the view to take that flag into consideration? And if it is not a view, but 2 separate tables, how could I handle the references?</p>
  
  <p>Also, deleting a thread. Assume that on thread deletion I don't want the thread to be actually deleted, because I don't want users that posted comments to suddenly not see their comments. How would deal with this?</p>
  
  <p>What are the best practices for these kind of problems?</p>