[GLLUG] Is there any sane reason to do this? (Database question.)

Adrian McMenamin adrianmcmenamin at gmail.com
Wed Oct 8 18:54:05 UTC 2014


On 7 October 2014 20:05, John Winters <john at sinodun.org.uk> wrote:

> I'm extracting data from a legacy (sort of - still actively sold) system
> which has the following table:
>
> (CSV dump of the table)
>
>
> Days,DateIdent
> 2000-01-03 00:00:00.000,1
> 2000-01-05 00:00:00.000,2
> 2000-01-06 00:00:00.000,3
> 2000-01-07 00:00:00.000,4
> 2000-01-08 00:00:00.000,5
> 2000-01-10 00:00:00.000,6
> 2000-01-11 00:00:00.000,7
>
>
[snip]


>
> I'm no database guru, but this seems to me to be bordering on the
> insane.  Apart from anything else, it means you have to error check
> every attempt to retrieve a record with a date in it, in case the date
> integer does not have a corresponding row in the Date table.
>
> Is there a good design reason to do this?
>
>
Somebody didn't want to write the logic to handle dates but just wanted to
add integers?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/gllug/attachments/20141008/6417f4df/attachment.html>


More information about the GLLUG mailing list