Re: ForeignKey-Constraint with more than 1 tables

From: Andreas Mosmann <>
Date: Wed, 02 Apr 2008 11:10:11 +0200
Message-ID: <>

The idea was only to have one column CID_LOCATION, so that a) I can invent new _location_tables_ without changing table TTREES b) I later can easy divide a _location_table_ into more tables a la TFORRESTS -> TFORRESTS_COUNTY1/TFORREST_COUNTY2 ... and back c) use a normal fk_constraint

c) doesn't work
b) too theoretical
a) seem to be more problems than advantages

To build subtables and supertables is more overhead than I want

So I do as I dis and if I understood correctly this was an option some of you mentioned:

  1. For each _location_table_ an ID- column
  2. after-insert-trigger, that exact 1 ID is not NULL

Thank you all
Andreas Mosmann

wenn email, dann AndreasMosmann <bei> web <punkt> de
Received on Wed Apr 02 2008 - 04:10:11 CDT

Original text of this message