Re: Basic Question about DELETE

From: Ike (rxv_at_hotmail.com)
Date: 03/17/04

  • Next message: Thomas Kellerer: "Re: Oracle JDBC driver exception "Stream has already been closed""
    Date: Wed, 17 Mar 2004 05:18:22 GMT
    
    

    It seems what I SHOULD do, is add a field, a boolean, a simple 'deleted'
    field. This way, referential integrity CAN be maintained, and, in an editor,
    only show those fields where deleted==false. It seems to be a solution,
    no? -Ike

    "David Harper" <devnull@obliquity.u-net.com> wrote in message
    news:_wI5c.3852$a95.3582@newsfe1-win...
    > 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: Thomas Kellerer: "Re: Oracle JDBC driver exception "Stream has already been closed""

    Relevant Pages

    • Re: Basic Question about DELETE
      ... > It seems what I SHOULD do, is add a field, a boolean, a simple 'deleted' ... If Ike's application demands referential integrity, ... >> he should make sure that he is using InnoDB tables. ... to think about some admin tool to periodically really purge complete sets of ...
      (comp.lang.java.databases)
    • MySQL: What table type are you ?
      ... (just didnt look hard enough) ... Which is better: MyISAM or INNODB ?? ... I realize that referential integrity can be enforced via code ( ...
      (alt.php)
    • Re: MySQL: What table type are you ?
      ... > All the apps I've written thus far are MyISAM; however, INNODB offers our ... > dear friend `referential integrity` which can reduce for those of us who ... > from transaction control and foreign key contraints? ... This site benchmarks InnoDB vs MyISAM and InnoDB runs a lot ...
      (alt.php)
    • Re: Referential Integrity
      ... Doug Steele, Microsoft Access MVP ... "Walter" wrote in message ... >>If the foreign key is a Number type field, ... >>> record has been entered without referential integrity ...
      (microsoft.public.access.forms)
    • Re: Setting foreign key as index
      ... Do You mean setting the relationship in the Relationships window and enforcing ... referential integrity makes Access change the Index property of foreign key ... If there is no index on the foreign key field, ...
      (microsoft.public.access.gettingstarted)