Subject Re: [Firebird-Java] How to turn referential integrity checking off
Author Jim Starkey
pifproject wrote:

> Hello all!
>
> Is there a way to turn referential integrity constraint checking off,
> when populating a Firebird database? I.e. is there a way not to check
> the imported and exported foreign key references between table columns
> when you write data to a Firebird database in random order?
>
> E.g. for MySQL this is possible by using the command "SET
> FOREIGN_KEY_CHECKS=0" (executing this commantd via JDBC before writing
> the database data). But I could not find information on how one can do
> that with FirebirdSQL.
>
I've been pushing for this for about a year and half now. Foreign keys
are exceeding valuable semantic information about a database, but
sometimes automatic inforcement is unnecessary because well written
applications make it redundant, sometimes it's counter productive, as
when there are a huge number of duplications, and sometimes it is
catastrophic, as when a restore discovers a violation.

All these cases can be addressed by the simple expedient of declaring a
foreign key inactive. Triggers, from the afternoon when I created them,
have had the ability to be marked inactive. So should foreign key
constraints.