[AccessD] Number vs text data type

Drew Wutka DWUTKA at marlow.com
Tue Oct 14 16:18:21 CDT 2003


Yes, but if something can be stored JUST as a number, it is not only a
storage space issue, but a speed issue.  If you took just the 5 digit Zip
code, (ignoring any extensions), and you wanted to search for addresses in
the range of 70000 to 80000, if the numbers are stored as text, the
processor is going to have to compare each digit of the number, because it's
looking at ASCII (or unicode) and NOT a number.  However, if it's stored as
a number, then it's a VERY simple check to determine if it falls in that
range!

Drew

-----Original Message-----
From: Charlotte Foust [mailto:cfoust at infostatsystems.com]
Sent: Monday, October 13, 2003 10:48 AM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Number vs text data type


Same holds true for social security numbers in the US and for telephone
numbers everywhere.  There are good reasons NOT to use numbers for some
kinds of numeric data, which is probably where the argument comes from
in the first place, that and the old approach of squeezing everything
into the smallest possible datatype to shave storage bytes.

Charlotte Foust

-----Original Message-----
From: Susan Harkins [mailto:ssharkins at bellsouth.net] 
Sent: Monday, October 13, 2003 7:32 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Number vs text data type


What about Zip Codes, etc... what possible purpose would you have for
treating such an entry as a number?

I'm afraid this isn't old school -- it's still very alive and with us.

Susan H.


> That sounds like one of my co-workers who comes from the
> old school early-days C and COBOL programming. He makes everything 
> text unless an actual calculation must be performed, even when that 
> doesn't necessarily make sense in context. I believe that if its a 
> number it should be treated as a number unless there is a very 
> compelling reason not to, for all of the reasons given so far and
> probably others I haven't thought of. To me, logic tells
> you that if the data is numeric you should use a number
> data type, using text just muddies things up. As far as a
> number field needing "additional resources", especially
> for calculations, that makes no sense at all to me. Some
> number types may take additional storage space as compared
> to holding the same digit characters in a text type, and
> that can become an issue for DBAs when they are working
> under short drive space conditions. Other than, I can't
> think of a resource reason.
>
> Ron
>
> On Mon, 13 Oct 2003 10:42:15 -0400
>   CYNTHIA SPELL <CSPELL at jhuccp.org> wrote:
> >I will, that's a good idea.  What I've heard so far is
> >that logic tells you that if you don't need to calculate, you should 
> >use text.  And that a number data type requires additional resources 
> >in order for the field to have the ability to do the calculating.
> _______________________________________________
> AccessD mailing list
> AccessD at databaseadvisors.com 
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com
>

_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
_______________________________________________
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com


More information about the AccessD mailing list