List:General Discussion« Previous MessageNext Message »
From:SGreen Date:March 14 2006 6:30pm
Subject:Re: Accountability with MySQL
View as plain text  
"Martijn Tonies" <m.tonies@stripped> wrote on 03/14/2006 01:16:11 PM:

> Hello Bruno,
> 
> > well about the date default value being invalid, well it´s working 
here in
> > my system (MySQL 4.1.16, Mac OS X 10.4.5), and all my systens work 
with
> > this...
> 
> 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?
> 
> 
> Martijn Tonies
> Database Workbench - development tool for MySQL, and more!
> Upscene Productions
> http://www.upscene.com
> My thoughts:
> http://blog.upscene.com/martijn/
> Database development questions? Check the forum!
> http://www.databasedevelopmentforum.com
> 

Martin,

If you used MySQL just a bit more often for day-to-day operations (yes, we 
all know that you build useful tools that interoperate with several RDBM 
systems), you would know that you cannot assign anything but constant 
values as default values for any type of column in MySQL (timestamp being 
the singular, partial exception). That means you cannot design a column to 
have more meaningful default date by capturing the current time because 
functions are not permitted as default values (yet). 

With that in mind, a design default of "0000-00-00" is as good as any 
other single, randomly chosen default date, don't you think? That's also 
the "default" default date if you define a non-null date column and do not 
specify your own default in the definition.


Shawn Green
Database Administrator
Unimin Corporation - Spruce Pine
Thread
Accountability with MySQLBruno B B Magalháes14 Mar
  • Re: Accountability with MySQLMartijn Tonies14 Mar
    • Re: Accountability with MySQLBruno B B Magalháes14 Mar
  • Re: Accountability with MySQLSGreen14 Mar
    • Re: Accountability with MySQLMartijn Tonies14 Mar
    • Re: Accountability with MySQLRhino14 Mar
    • Re: Accountability with MySQLMartijn Tonies14 Mar
    • Re: Accountability with MySQLRhino15 Mar
      • Re: Accountability with MySQLJames Harvard15 Mar
    • Re: Accountability with MySQLMartijn Tonies15 Mar
    • Re: Accountability with MySQLMartijn Tonies15 Mar
    • Re: Accountability with MySQLRhino15 Mar
    • Re: Accountability with MySQLMartijn Tonies15 Mar
      • Re: Accountability with MySQLStephen Cook16 Mar
    • Re: Accountability with MySQLRhino15 Mar
      • Re: Accountability with MySQLJames Harvard16 Mar
    • Re: Accountability with MySQLMartijn Tonies16 Mar
      • Re: Accountability with MySQLMark Leith16 Mar
    • Re: Accountability with MySQLMartijn Tonies16 Mar
      • Re: Accountability with MySQLJames Harvard16 Mar
      • Re: Accountability with MySQLAlec.Cawley16 Mar
        • Re: Accountability with MySQLMartijn Tonies16 Mar
          • Re: Accountability with MySQLAlec.Cawley16 Mar
          • Re: Accountability with MySQLJames Harvard16 Mar
          • RE: Accountability with MySQLGordon16 Mar
            • On MySQL Views (Re: Accountability with MySQL)Martijn Tonies16 Mar
    • Re: Accountability with MySQLMartijn Tonies16 Mar
    • Coalesce (was: Re: Accountability with MySQL)Martijn Tonies16 Mar
    • True Propositions (was Re: Accountability with MySQL)Martijn Tonies16 Mar
  • Re: Accountability with MySQLMartijn Tonies14 Mar
    • Re: Accountability with MySQLSGreen14 Mar
      • Re: Accountability with MySQLMartijn Tonies14 Mar
  • Re: Accountability with MySQLRhino14 Mar
  • Re: Accountability with MySQLRhino14 Mar
Re: Accountability with MySQLBruno B B Magalháes14 Mar
  • Re: Accountability with MySQLRhino15 Mar
Re: Accountability with MySQLMartijn Tonies16 Mar
Re: Accountability with MySQLMartijn Tonies16 Mar