[database] [Database] Toward better databases
Joshua D. Drake
jd at commandprompt.com
Tue Jul 8 02:57:24 UTC 2008
On Mon, 2008-07-07 at 20:42 -0500, Larry Garfield wrote:
> On Monday 07 July 2008 8:44:40 am you wrote:
> > Howdy, everyone. Here's my current brain-dump:
> CREATE TABLE variable (
> name varchar(128) NOT NULL default '',
> value text NOT NULL,
> PRIMARY KEY (name)
> )
>
I would also note that the above is horribly bad.
You just said that your primary key is name but that its default is '',
that protects against NOT NULL but allows a single '' as well as a
single ' ' or ' ' or ' ' etc...
Sincerely,
Joshua D. Drake
More information about the Database
mailing list