On 9/23/08, David Ashley <[EMAIL PROTECTED]> wrote:
>
> For example, for the 50 states, a lot of programmers would put this logic
> in
> the web script and just store the two-letter postal code in the database
> table (but with no separate table for "states").  The mapping from "MI" to
> "Michigan" would occur in the web scripts; as would the logic to know that
> "XQ" is not a state.
>

Keep in mind that, as you add more countries, maintaining in-scipt code/name
mappings of state codes will become more and more cumbersome. Another
problem will arise if you want to view user information, along with full
country and state names, from a different programming language.

Plus, if the same query is run very often and table is almost static,
chances are high that the result will be in query cache.

-- 
Sincerely yours,
Olexandr Melnyk <><
http://omelnyk.net/

Reply via email to