List:General Discussion« Previous MessageNext Message »
From:Christian Mack Date:March 12 1999 11:44am
Subject:Re: sort of defragmentation?
View as plain text  
Ed Carp wrote:
> 
> >> You mean "cascading updates and deletes", don't you?  Triggers and
> foreign
> >> keys have little to do with whether or not deletes and updates cascade.
> >
> >Thanks for the correction. What I meant to say is "Since
> >mysql is does not support any kind of data integrity
> >validation and an update will never modify the table
> >that is not explicitly mentioned in the query...."
> 
> You know, it would really be cool to support such a thing ... but as far as
> I can tell, MySQL doesn't have the infrastructure to support such a thing -
> it would need to know the relationships between tables.
> 
> You know, thinking about it, it wouldn't be a big deal to add a
> relationships table to each database - it would contain the source table,
> target table, source field, and target field:
> 
> create table relationships (
> source_table varchar(255),
> source_field varchar(255),
> target_table varchar(255),
> target_field varchar(255));
> 
> When MySQL gets a "DELETE/UPDATE" SQL command, it looks through the
> relationships table and spawns threads to do the cascade delete/update.  Am
> I making any sense?

Yes, but all DELETE/UPDATE without dependencies would also have to look into the
dependencies table, and that's an extra overhead.

Also I have a running application, which uses dependencies between two databases.
They wouldn't be handeled this way. This would lead to do it myself on some queries
and let it do mysql on others. Not very transparent.

I think when stored procedures are out in mysql, you could do such things if you need it.
Till then be patient :)

Tschau
Christian

Thread
sort of defragmentation?Mike Otto11 Mar
  • Re: sort of defragmentation?kalle volkov11 Mar
  • Re: sort of defragmentation?Christian Mack11 Mar
    • Re: sort of defragmentation?Charles Kirby11 Mar
      • Re: sort of defragmentation?Sasha Pachev11 Mar
        • Re: sort of defragmentation?Charles Kirby11 Mar
          • Re: sort of defragmentation?Sasha Pachev11 Mar
            • Re: sort of defragmentation?Charles Kirby11 Mar
              • Splitting query results among machines?Brian Bray11 Mar
                • RE: Splitting query results among machines?Brett Error11 Mar
  • SIGSEV using Mysql++Sander Pilon26 Aug
Re: sort of defragmentation?Ed Carp11 Mar
  • Re: sort of defragmentation?Sasha Pachev11 Mar
Re: sort of defragmentation?Ed Carp11 Mar
  • Re: sort of defragmentation?Christian Mack12 Mar
Re: Splitting query results among machines?Fred Lindberg11 Mar
Re: sort of defragmentation?Ed Carp12 Mar
Re: sort of defragmentation?Christian Mack13 Mar
Re: sort of defragmentation?Ed Carp13 Mar