Re: ForeignKey-Constraint with more than 1 tables
From: Andreas Mosmann <mosmann_at_expires-30-04-2008.news-group.org>
Date: Wed, 02 Apr 2008 11:10:11 +0200
Message-ID: <1207127411.58@user.newsoffice.de>
Date: Wed, 02 Apr 2008 11:10:11 +0200
Message-ID: <1207127411.58@user.newsoffice.de>
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:
- For each _location_table_ an ID- column
- after-insert-trigger, that exact 1 ID is not NULL
Thank you all
Andreas Mosmann
-- wenn email, dann AndreasMosmann <bei> web <punkt> deReceived on Wed Apr 02 2008 - 04:10:11 CDT