title: How to best design address locations in any SQL Database?
body: <p><em>Overview</em></p>
  
  <p>I'm working on some Emergency Services reporting and mapping application for California (kind of weird, considering the fires there, right now...). We need to map demographic and emergency data for an internal govt unit.</p>
  
  <p>What we have are <em>all</em> the streets, cities and neighborhoods in California. Each neighborhood also has it's relevant shapefile (lat long that defines it's boundaries). This was given to us by the US Census board (all public domain stuff) website.</p>
  
  <p><em>Problem</em></p>
  
  <p>I'm not sure how to best design the DB tables. We haven't been told what type of DB we need to use .. so we're open to suggestions if that helps. We have experience with MS SQL 2005 and 2008 (and the spatial stuff in '08).</p>
  
  <p>We can have the following legit data.</p>
  
  <ul>
  <li>Street, City, State</li>
  <li>City, State</li>
  <li>Neighborhood, State</li>
  <li>State</li>
  </ul>
  
  <p>The reason why State is a legit location is because we're told this might be sold to other states, so we need to plan for that now.</p>
  
  <p>So, originally, i thought of this...</p>
  
  <ul>
  <li>LocationId INTEGER PK Identity</li>
  <li>Street NVARCHAR(100)</li>
  <li>Neighbourhood NVARCHAR(100)</li>
  <li>City NVARCHAR(100)</li>
  <li>State NVARCHAR(100)</li>
  <li>Latitude VARCHAR(15)</li>
  <li>Longitude VARCHAR(15)</li>
  <li>Shapefile </li>
  </ul>
  
  <p>None of those are nullable, btw. But after a short while, i thought that it was a waste to have so many 'California' text or 'San Diego' text in the fields. So i changed the table to be more normalised by making the Neighborhood, City and State fields a foreign key to their own new table (eg. lookups) .. and those two fields are now NULLABLE.</p>
  
  <p>So .. that all works fine. except when i try and do some Sql statements on them. Because of the NULLABLE FK's, it's a nightmare to make all these outer join queries :(</p>
  
  <p>What about having the main table, the sub-lookup tables (eg. Neighbourhoods, Cities and States) linked via ID's and then place all this in a view? Remember, NeighborhoodID and CitiyID would be NULLABLE.. ???</p>
  
  <p>I just want to see people's thoughts on this and the <em>reasons</em> they made their suggestions, please. I'm really worried and confused but are eager to learn.</p>
  
  <p>Please help!</p>
  
  <hr>
  
  <p>edit 1: I need to stick to an RDBMS Database.</p>
  
  <p>edit 2: I'm thinking about going a single table (de-normalized) with constraints to keep the sum of the fields unqiue OR multi-tables with nullable FK's on the main table (eg. Locations (main table), Neighborhoods, Cities, States ... normalized db schema).</p>
  
  <p>edit 3: Added City to the sample, second list.</p>
  
  <p>edit 4: Added view question.</p>