From: "Sujay Koduri"

> I guess anywhere we have 3 levels of hierarchies for a phone number.
> (Country code, Area code and the actual number).

That's a pretty wild guess IMHO. You have to be absolutely sure that this is
true for each and every country in the world. Furthermore, various telecom
providers have short phone numbers for their own services that are only
valid for their clients. If your application is to store these numbers too
(e.g. a billing application) then you will have phone numbers without
country and area code!

> The advantage of seperating them into different columns(Either an integer
or
> a string) is that he can group different phone numbers based on area code
or
> country code.

Phone numbers cannot be considered to be numbers IMHO. The customer might
want to store the "name" version of a phone number (in some countries you
can get phone 'numbers' in certain fictive "area codes" where the "actual
number" consists of letters (e.g. 0800-mysql). If these 'numbers' are to be
stored too an integer type field will not suffice.

If you need to group phone numbers it will only be based on country code,
country code plus area code, or country code plus area code plus a part of
the actual number. So you need to group by phone number starts with. This
can easily be done with a string type and an index.

Using a clever and consistent format to seperate the various parts of the
phone number (whole parts with leading zero's!) combined with knowledge on
how to build the number to dial (drop the leading zero or not, etc.) is all
you need to make an application that works in more than one country.

Regards, Jigal.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to