title: How do I properly design a database schema for this scenario
body: <p>Suppose I owned a business that sold cars and motorcycles.  I want to track data on each.  My company provides a free warranty for every car, but we do not even offer warranties on motorcycles.  Initially, I thought I'd have two tables - a "Vehicles" table and a "Warranties" table, like this</p>
  
  <pre><code>Vehicles                                                     Warranties
  
  VehicleID, SalePrice, VehicleType, WarrantyID                WarrantyID, EffDate, ExpDate
  </code></pre>
  
  <p>Where VehicleType is either "car" or "motorcycle".  My drawback to this is that, in the Vehicles table, every motorcycle would have a null value for "WarrantyID".  Would this be considered bad practice?</p>
  
  <p>Another approach I've considered is using three tables like</p>
  
  <pre><code>Cars                                                         Motorcycles
  
  VehicleID, SalePrice, WarrantyID                             Vehicle ID, SalePrice
  
  
  Warranties
  
  WarrantyID, EffDate, ExpDate
  </code></pre>
  
  <p>My drawback to this is that I'm separating motorcycles and cars into two tables that will almost be identical.  (In reality, they'll have more fields like purchase cost, mileage, etc).  The ONLY difference is that all cars will have a warranty and no motorcycles will have a warranty.  </p>
  
  <p>(Note: I'm also making the assumption that 2 or 3 cars could share a single warranty.)</p>
  
  <p>What's the proper way to set up this database?</p>