RE: Sort table names and maintain referential integrity
Posted in 2000
Topics: Server Administration, Triggers, Constraints & Referential Integrity
Hello, Have a look at this page : http://www.tc.umn.edu/~hause011/ There is a DBA SQL script called : ref_load_ord.ksh It should build a graph with referential constraint. I didn't test it, but maybe it can give you some ideas ? Ben > -----Original Message----- > From: domenm@my-deja.com [SMTP:domenm@my-deja.com] > Sent: Friday, July 07, 2000 10:58 AM > To: informix-list@iiug.org > Subject: Re: Sort table names and maintain referential integrity > > Hi! > > What I'm trying to do is to get a sorted list of table names > representing the right referential integrity. > This list is then used by my application to insert (load) data into > those tables in the database. The main functionality of application is > to synchronize data among databases. So, application finds differences > on some tables, generates adequate SQL sentences and tries to execute > those sentences on the comparative side (tables). By default the table > names are sorted alphabetically and when I'm lucky the referential > integrity is already correct. But mostly the application tries to > insert some data into a slave table and master table data is not > existing yet. As a result I get an error -691 (Missing key in > referenced table for referential constraint constraint-name). > > So, generaly the problem seems to be very simple, but... > Thanks for all responses. > Domen >
Hi! My problem is solved! Ref_load_ord.ksh script certainly gave me an idea. Thanks to Steven Hauser. Also special thanks to Art S. Kagel (I'll follow your advice about posting a problem in the future), Henry Benoit Jonathan Leffle, Rudy Fernandes and others who directed me into the right way (and saved my butt). Thanks again! Domen ------------------------------------------------- In article <8k4l5u$96g$1@news.xmission.com>, Henry Benoit <Benoit.Henry@Galvalange.lu> wrote: > > Hello, > > Have a look at this page : http://www.tc.umn.edu/~hause011/ > > There is a DBA SQL script called : ref_load_ord.ksh > It should build a graph with referential constraint. > I didn't test it, but maybe it can give you some ideas ? > > Ben > > > -----Original Message----- > > From: domenm@my-deja.com [SMTP:domenm@my-deja.com] > > Sent: Friday, July 07, 2000 10:58 AM > > To: informix-list@iiug.org > > Subject: Re: Sort table names and maintain referential integrity > > > > Hi! > > > > What I'm trying to do is to get a sorted list of table names > > representing the right referential integrity. > > This list is then used by my application to insert (load) data into > > those tables in the database. The main functionality of application is > > to synchronize data among databases. So, application finds differences > > on some tables, generates adequate SQL sentences and tries to execute > > those sentences on the comparative side (tables). By default the table > > names are sorted alphabetically and when I'm lucky the referential > > integrity is already correct. But mostly the application tries to > > insert some data into a slave table and master table data is not > > existing yet. As a result I get an error -691 (Missing key in > > referenced table for referential constraint constraint-name). > > > > So, generaly the problem seems to be very simple, but... > > Thanks for all responses. > > Domen > > > Sent via Deja.com http://www.deja.com/ Before you buy.