SQL 2005 Standard Datatypes


I'm putting together a database of locations for looking up nearest locations for a given address. As I started laying out the table going about my business I wondered what other people were doing and if there was a 'best practices' for some common datatypes. Such as phone numbers, addresses and even latitude and longitude.

This is what I have so far. Any suggestions or improvements?

These should all be US addresses, FYI.

 Column          DataType
 ------        ------------
 id            int
 city          nvarchar(100) 
 address       nvarchar(100) 
 address2      nvarchar(100)
 state         varchar(2)
 zip           nvarchar(10)
 phone         nvarchar(14)
 fax           nvarchar(14) 
 name          nvarchar(100)
 latitude      float
 longitude     float
 notes         text

Best Solution

Considering you only want US addresses, I'd go with varchar for fax, phone and zip. You could even probably use varchar for city, address and AddressExtra as well.

If you are going to print address you might need some way to break it up by line, but you only have one column, which could be a little short.

I'd normalize notes into its own table, so you can track them by date or type.

you might want a status, "N"ew, "D"uplicate, "X"deleted, "A"ctive, etc.