List:General Discussion« Previous MessageNext Message »
From:Ilya Kazakevich Date:April 21 2013 3:21pm
Subject:RE: Design help
View as plain text  

>Many thanks for your response.  Can yo u offer any advice with regards
>of country_codes eg gb and regions, cities etc ?  I've been reading up on
> etc.  Should I be looking to use a
>Surrogate key for countries ?  Or the country code like fr for France ?
>Same with regions/states and cities and districts ?

I do not think you need surrogate key for country. Country code is 2
letters, so if you use char(2) charset ASCII you only need 2 bytes for that.
That is ok and your queries would be easier to read.
You do not need surrogate keys for US states also but if you speak about
"states" in general you may need key (many countries over the world have
The same is about cities: city name is too big to be used as primary key,
and there may be many cities with similar names.


Design helpNeil Tompkins21 Apr
  • Re: Design helpDenis Jedig21 Apr
    • Re: Design helpNeil Tompkins21 Apr
      • RE: Design helpIlya Kazakevich21 Apr