----- Original Message -----
From: "Martijn Tonies" <m.tonies@stripped>
Sent: Tuesday, March 14, 2006 1:16 PM
Subject: Re: Accountability with MySQL
> Hello Bruno,
>> well about the date default value being invalid, well it´s working here
>> my system (MySQL 4.1.16, Mac OS X 10.4.5), and all my systens work with
> Yes, it's a valid value in MySQL, but it's an invalid date,
> that's what I'm trying to say. Why have an invalid date
> as the default?
I think there may be a little bit of language confusion here.
Bruno, I think Martijn is suggesting that you use a date that can actually
exist as the default transaction date; '000-00-00' is accepted by MySQL as a
date that can be stored in a table but it is not a date that ever really
existed. There was never a Year 0 in the history of the world.
I think Martijn is right; it is probably a better choice to use a "real"
date in your table. The obvious choice would be to store the current date in
that column. For example, if you add a row to the table, the new row should
normally contain the date that the transaction was executed; that might be
yesterday or a week ago or maybe even longer. But if no transaction date is
known, it would probably be reasonable to store today's date. But sometimes
that _wouldn't_ be reasonable.
You should probably talk to the people in the bank about this and ask if it
is ever possible that the transaction date would be unknown; if the
transaction data _can_ be unknown, you should ask what date they usually
store in their existing system in that case. Then your new table should
probably do the exact same thing as the old system does, assuming everyone
agrees that this is the right thing to do. (The users may say that it is the
wrong thing to do and suggest a better value to choose for the transaction
date.) But if the transaction date can never be unknown, it doesn't make
much difference what you choose as the default date since it will never be
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.385 / Virus Database: 268.2.2/280 - Release Date: 13/03/2006