Tom:
A telephone number is not a 'number' because its an encoding system. Zip
codes and ISBN numbers are other examples. Its nothing to do with the fact
that arithmetical operations are not required to be performed on them; that's
an argument which is often put forward, but it’s a specious one. A column
can perfectly validly be a 'number' without any arithmetic being involved
because the number has ordinal or cardinal significance in terms of the
attribute type of which the number is a value.
We should not get obsessed about which data type is the 'correct' one for
any attribute type, however. So long as the principles of the model are
respected it doesn't actually matter. Using a date/time data type for
date/time values is a convenience, but if the date is stored as text then its
perfectly possible to process the values in any way you wish. If it is done
then it’s a good idea to use an internationally unambiguous format such as
the ISO standard YYYY-MM-DD hh:mm:ss format (Access uses nn for the minutes
of course rather than using the upper and lower case to distinguish between
months and minutes as the ISO standard does).
In your case the question is not one of data types at all, but solely
whether the model requires one or two columns and the criterion here is, I
believe, as I said in my first reply, that to use a single column in the way
you describe would be to have values of two different attribute types in one
column; that's just playing fast and loose with the basic principles of the
database relational model.
As far as the need for 'extra validation' is concerned, yes it does require
a little more work, but that's what we are paid for. No pain, no gain, as
they say.
Ken Sheridan
Stafford, England
"Tom" wrote:
> Thanks - I have strong inclinations to make two fields also, for all
> the reasons you both cited.
>
> My concern though was what happens when we get to the last stage of
> the process and all that is needed is a date? Extra validation needs
> to occur so I don't get inconsistent values, extra work needs to be
> done to get right value to display on reports, and extra thought needs
> to go into form design so users aren't left with a null field and
> wondering why. All fairly trivial to deal with, but cumulatively, I
> wasn't so sure.
>
> Bascially, that nagging voice in the back of my head kept saying, what
> is so different about storing a date in a text field when you don't
> intend on doing date math as opposed to storing a telephone number in
> a text field. After all, the telephone number is a "number", but
> storing it as such is a no-no...
>
> Thanks
>
> Tom
>
|