title: Table "Inheritance" in SQL Server
body: <p>I am currently in the process of looking at a restructure our contact management database and I wanted to hear peoples opinions on solving the problem of a number of contact types having shared attributes.</p>
  
  <p>Basically we have 6 contact types which include Person, Company and Position @ Company.</p>
  
  <p>In the current structure all of these have an address however in the address table you must store their type in order to join to the contact.</p>
  
  <p>This consistent requirement to join on contact type gets frustrating after a while.</p>
  
  <p>Today I stumbled across a post discussing "Table Inheritance" (<a href="http://www.sqlteam.com/article/implementing-table-inheritance-in-sql-server" rel="noreferrer">http://www.sqlteam.com/article/implementing-table-inheritance-in-sql-server</a>). </p>
  
  <p>Basically you have a parent table and a number of sub tables (in this case each contact type). From there you enforce integrity so that a sub table must have a master equivalent where it's type is defined. </p>
  
  <p>The way I see it, by this method I would no longer need to store the type in tables like address, as the id is unique across all types.</p>
  
  <p>I just wanted to know if anybody had any feelings on this method, whether it is a good way to go, or perhaps alternatives? </p>
  
  <p>I'm using SQL Server 05 &amp; 08 should that make any difference.</p>
  
  <p>Thanks</p>
  
  <p>Ed</p>