From: Larry W. V. <lv...@ca...> - 2001-09-22 10:25:14
|
> A leading zero serves no purpose, it doesn't change > the value of the number. A leading zero does serve a purpose actually - if one is keying in a password that includes a leading zero, then dropping it leaves one without the knowledge of whether it is needed or not. Rather than trying to make assumptions of what the user of a package needs, I recommend leaving what someone types into a field EXACTLY as they type it. If a field has entry contraints, just don't let the wrong kind of data be entered into the field in the first place. -- Never apply a Star Trek solution to a Babylon 5 problem. Larry W. Virden <mailto:lv...@ca...> <URL: http://www.purl.org/NET/lvirden/> Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. -><- |
From: Larry W. V. <lv...@ca...> - 2001-09-25 14:03:36
|
From: Oliver Goetz <oli...@we...> > I have to disagree! Certainly your privledge. > If you want to store a sequence of numbers or characters exactly > as you enter it, then use a string. It doesn't seem obvious to me that non-technical users will make the assumption that phone numbers, social security numbers, passwords, etc. that are numeric should be stored in something called 'string' if they are going to need to keep leading zeros. Seems to me to be much more PalmOS friendly to keep whatever the user types just the way they type it. -- Never apply a Star Trek solution to a Babylon 5 problem. Larry W. Virden <mailto:lv...@ca...> <URL: http://www.purl.org/NET/lvirden/> Even if explicitly stated to the contrary, nothing in this posting should be construed as representing my employer's opinions. -><- |
From: Fab <kr...@bi...> - 2001-09-25 18:19:25
|
> It doesn't seem obvious to me that non-technical users will make > the assumption that phone numbers, social security numbers, passwords, > etc. that are numeric should be stored in something called 'string' > if they are going to need to keep leading zeros. It doesn't need to be that obvious to be usable :-))) If users can't imagine or deduct it from a simple try, they probably won't do anything usefull with a database program :-))))) > Seems to me to be much more PalmOS friendly to keep whatever the > user types just the way they type it. Not a the point to transform the way an integer is stored. Say the leading "0" is kept, you have to internally store the number in a string, for the integer type in whatever language you choose discard all leading zeros. Then you get some problems : each time you want to compute with the number you have to convert it, with performances consequences (great), you get size problems (same than dimensionning a string field), etc... You could say, well, store it as both the integer, and the way it has been entered, but that leaves the sizing problem, at the cost of a bigger database. Fab. |
From: Oliver G. <oli...@we...> - 2001-09-25 13:57:58
|
Larry W. Virden wrote: >>A leading zero serves no purpose, it doesn't change >>the value of the number. >> > > A leading zero does serve a purpose actually - if one is keying in a > password that includes a leading zero, then dropping it leaves one > without the knowledge of whether it is needed or not. > I have to disagree! If you want to use a number field, then the numbers should be handled and stored mathematically correct. As a number, 1234 is the same as 01234. If you display it with leading zeros, then it's just that: a formatting convention for display purposes. If you want to store a sequence of numbers or characters exactly as you enter it, then use a string. > Rather than trying to make assumptions of what the user of a package > needs, I recommend leaving what someone types into a field EXACTLY as > they type it. If a field has entry contraints, just don't let the > wrong kind of data be entered into the field in the first place. > The creator of the database has to determine what he or she wants to store and chose the field types accordingly. Storing a number in such a way that leading zeros are stored with it makes no sense to me. BTW, storing the number as a string EXACTLY as it was entered by the user would be making an assumption about what the user wants to do with it later as well. Regards, Oliver -- Oliver Goetz, mailto:oli...@we... "I'd rather laugh with the sinners than cry with the saints Sinners are much more fun... And only the good die young" -- Billy Joel |