Subject | Re: gfix & system tables question |
---|---|
Author | Didier Gasser-Morlay <Didiergm@nordnet.f |
Post date | 2003-02-14T11:28:50Z |
--- In ib-support@yahoogroups.com, "Martijn Tonies" <m.tonies@u...> wrote:
I don't have the records handy anymore because I deleted them but that
was a FK constraint. I am only half surprised since
<I could be wrong here>
there are NO FK defined between those 2 tables
</I could be wrong>
So in that case, any hickup (like front end application crashing or
your favorite Windows going AWOL) could cause serious trouble could'nt it.
That being said, I am not 100% sure of the amount of actual DAMAGE or
problem that would cause to a DB as the only reason I found it was
after a Windows forcing me to reboot I tried to recreate the FK I was
creating and was told that I was tried to insert a duuplicate in
INDEX$12, while I could not see the FK displayed.
Didier
> Hi,unfortunatly yes!
>
> > When using gfix I have not found a way to have some system table check
> > for data integrity : RDB$RELATION_CONSTRAINTS & RDB$REF_CONTRAINTS
> > where I could find some 'orphaned' rows
> >
> > I understand the following
> > when creating as FK from tableA to tableB
> > there should an entry in
> >
> > RDB$RELATION_CONSTRAINTS describing the name of the constraint, the
> > relation it applies to (TABLEA) and the name of the index to be used
> > (in the example of an FK)
> >
> > RDB$REF_CONTRAINTS describing what PK is to be used and what action to
> > be taken (eg RESTRICT) when deleting or updating. (then it's simply a
> > matter of rereading RDB$RELATION_CONSTRAINTS to find out which table
> > it applies to.
> >
> > I have found cases where there was 1 record in
> > RDB$RELATION_CONSTRAINTS and none on RDB$REF_CONTRAINTS and 1 example
> > of the contrary. FB does not choke on this and obviously this should
> > not happen in a live dn scenario, but can apparently happen with
> > developement databases.
>
> Actually - this should simply NEVER happen.
>
> And you are sure it's a FK constraint in RDB$RELATION_CONSTRAINTS?
>
>
I don't have the records handy anymore because I deleted them but that
was a FK constraint. I am only half surprised since
<I could be wrong here>
there are NO FK defined between those 2 tables
</I could be wrong>
So in that case, any hickup (like front end application crashing or
your favorite Windows going AWOL) could cause serious trouble could'nt it.
That being said, I am not 100% sure of the amount of actual DAMAGE or
problem that would cause to a DB as the only reason I found it was
after a Windows forcing me to reboot I tried to recreate the FK I was
creating and was told that I was tried to insert a duuplicate in
INDEX$12, while I could not see the FK displayed.
Didier
>
> With regards,
>
> Martijn Tonies
> InterBase Workbench - the developer tool for InterBase & Firebird
> Firebird Workbench - the developer tool for Firebird
> Upscene Productions
> http://www.upscene.com
>
> "This is an object-oriented system.
> If we change anything, the users object."