Re: How should I type my data- ZIP codes and States/Regions
Date: 2000/05/04
Message-ID: <8esgve$iup$1_at_nnrp1.deja.com>#1/1
In article <g5vbfsk9otqnajdhhg5r45qp6r79a97n6b_at_4ax.com>,
Fernando <spamers_at_must.die> wrote:
> On Thu, 13 Apr 2000 10:19:31 -0400, "Jon M." <Jonatmfr_at_eei.org> wrote:
>
>> In my experience it is far better to store zips as strings,
>> especially if you ever intend to store international addresses
>> (ever see a Canadian zip code?). I'm not sure I understand why
>> you would even consider storing a state as a number.
>
> I guess he isn't sure if storing the states as strings (and repeating
> n times the same string) or using a number: a foreign key from a table
> consisting in state_id and state_name
> // Fernando Rodriguez Romero
I'm not sure I see the advantage of this... You'd have the same number of numeric foreign keys as you would 2-digit strings...
On the other hand, I've been toying with the idea of only including zipcode in the table that stores addresses and using that as a key in another table that stores the city, state, and county. (International addresses are not an issue with this database). These other fields would be automatically populated once the zipcode is entered... unfortunately, I haven't yet found a list of this data - anyone know where I might?
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Thu May 04 2000 - 00:00:00 CEST