Re: MySQLs' "FOREIGN KEYS¨ - Mailing list pgsql-advocacy

From Rajesh Kumar Mallah
Subject Re: MySQLs' "FOREIGN KEYS¨
Date
Msg-id 200311101946.39867.mallah@trade-india.com
Whole thread Raw
In response to Re: MySQLs' "FOREIGN KEYS¨  (Jeff <threshar@torgo.978.org>)
Responses Re: MySQLs' "FOREIGN KEYS¨  (Josh Berkus <josh@agliodbs.com>)
List pgsql-advocacy
On Monday 10 Nov 2003 6:34 pm, Jeff wrote:
> On Mon, 10 Nov 2003 08:42:13 +0530
>
> Rajesh Kumar Mallah <mallah@trade-india.com> wrote:
> > Oops! really sorry , the tables were not of InnoDB type
> > that could have supported FKEYS. *Will post again* once
> > i get to put FKEYS properly on InnoDB tables.
> >
> > Still in that case also the beast should tell loudly about
> > whats going on behind.
>


> Wow. You know, I'd really expect it to at least go
> "Hey, you're using MyISAM tables, which don't actually do foriegn keys..
> so.. heh. Hope you don't actually need them!"
>
> instead of being led to believe (like what happened to you) that you
> actually had FK's and started building an app that relies on that fact.

The Mandrake RPMS' of mysql 4-0-14 does not create InnoDB tables
by default. In fact it does not even provide a /etc/my.cnf to tweak around.
I am not sure if their RPMS' (in mysqls' website) have default
settings of table handler to be InnoDB.In case default table handler is
MyISAM then its REALLY bad thing to hide and remain seilent abt.

Ok one thing that i think is good and MySQL enforces is INDEXES on
both the keys otherwise it gives  ERROR 1005. I think there was a old
thread on "Indexes on Foreign keys".

Now regarding the original problem, MySQL does not have that defect of
treating 0 as NULL , the confusion was becoz the tables were MyISAM that
did not support fkeys.

Again the error message that is given on FKEY violation is not as
good as ours  as in 7.4 , it does not indicate which key is violated
where ours does !

Regards
Mallah.


pgsql-advocacy by date:

Previous
From: Jeff
Date:
Subject: Re: MySQLs' "FOREIGN KEYS¨
Next
From: Bruce Momjian
Date:
Subject: Re: FW: [webmaster] Comparison to MySQL