Re: Basic Question about DELETE
From: David Harper (devnull_at_obliquity.u-net.com)
Date: 03/16/04
- Next message: Ted Byers: "Re: Applet Consideration"
- Previous message: Mark Matthews: "Re: Applet Consideration"
- In reply to:(deleted message) Harald Fuchs: "Re: Basic Question about DELETE"
- Next in thread: Ike: "Re: Basic Question about DELETE"
- Reply: Ike: "Re: Basic Question about DELETE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 16 Mar 2004 19:26:42 +0000
Harald Fuchs wrote:
> In article <1dfad7c0.0403160319.222b72f8@posting.google.com>,
> devnull@obliquity.u-net.com (David Harper) writes:
[SNIP]
>>Unfortunately, MySQL doesn't yet support cascading deletes, so Ike will
>>have to follow Silvio's original suggestions.
>
>
> From the fine MySQL manual:
>
> Starting from version 3.23.50, you can also associate the `ON DELETE
> CASCADE' or `ON DELETE SET NULL' clause with the foreign key
> constraint. Corresponding `ON UPDATE' options are available starting
> from 4.0.8. If `ON DELETE CASCADE' is specified, and a row in the
> parent table is deleted, then InnoDB automatically deletes also all
> those rows in the child table whose foreign key values are equal to the
> referenced key value in the parent row.
This is correct for InnoDB tables, but not for MyISAM, which is the
default table type. If Ike's application demands referential integrity,
he should make sure that he is using InnoDB tables.
David Harper
Cambridge, England
- Next message: Ted Byers: "Re: Applet Consideration"
- Previous message: Mark Matthews: "Re: Applet Consideration"
- In reply to:(deleted message) Harald Fuchs: "Re: Basic Question about DELETE"
- Next in thread: Ike: "Re: Basic Question about DELETE"
- Reply: Ike: "Re: Basic Question about DELETE"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|