List:General Discussion« Previous MessageNext Message »
From:Martijn Tonies Date:March 14 2006 6:38pm
Subject:Re: Accountability with MySQL
View as plain text  
Hello Shawn,

> > 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?

>
>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).

I know that.

>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).
>

Same here.

>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.

I'd rather say that having no default (and a NOT NULL) would be
the better thing to do.

What's the use of "not null" and a default?

Isn't that like saying: well, you have to fill in each column, but
if you don't I'll assign something empty-ish.


Martijn Tonies
Database Workbench - development tool for MySQL, and more!
Upscene Productions
http://www.upscene.com

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