title: How do I structure my blog engine's database for multiple post types like Tumblr?
body: <p>I'm building a blog engine that has multiple post types, e.g.: text, image, link, quote.</p>
  
  <p>The way I see it, I have two options:</p>
  
  <p><strong>Option 1: A single Posts table with all columns, some of which will inevitably be NULL</strong></p>
  
  <pre><code>Post table
  ==========
  * post_id
  * created_at
  * updated_at
  * user_id
  * post_type
  * text
  * image_url
  * link_url
  * quote_source
  </code></pre>
  
  <p><strong>Option 2: Separate tables for each post type</strong></p>
  
  <pre><code>Post table
  ==========
  * post_id
  * created_at
  * updated_at
  * user_id
  * post_type
  
  Text table
  ==========
  * post_id
  * text
  
  Image table
  ===========
  * post_id
  * image_url
  </code></pre>
  
  <p>I think you get the hint.  What are the pros/cons of each approach?  </p>
  
  <p>Does anyone know what Tumblr does?  (It's not clear from their API docs.) </p>