Re: MySQLs' "FOREIGN KEYS¨

From: Rajesh Kumar Mallah <mallah(at)trade-india(dot)com>
To: Jeff <threshar(at)torgo(dot)978(dot)org>
Cc: JanWieck(at)yahoo(dot)com, pgsql-advocacy(at)postgresql(dot)org
Subject: Re: MySQLs' "FOREIGN KEYS¨
Date: 2003-11-10 14:16:39
Message-ID: 200311101946.39867.mallah@trade-india.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)trade-india(dot)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.

In response to

Responses

Browse pgsql-advocacy by date

  From Date Subject
Next Message Bruce Momjian 2003-11-10 17:16:19 Re: FW: [webmaster] Comparison to MySQL
Previous Message Jeff 2003-11-10 13:04:48 Re: MySQLs' "FOREIGN KEYS¨