Re: ForeignKey-Constraint with more than 1 tables
Date: Fri, 28 Mar 2008 10:43:00 +0100
Message-ID: <1206697380.41@user.newsoffice.de>
Hans Mayr schrieb am 28.03.2008 in
<02275d11-1d19-4260-b782-fe648b10b689_at_e39g2000hsf.googlegroups.com>:
> Hi Andreas,
> Maybe it is a solution to create a unique ID for each location. A new
> table TTreeLocations with LocationID, LocationType (Street,
> Park, ...), ObjectID (this being the ID of street, park etc.) would be
> a way to do this.
> Best,
> Hans
Hi Hans,
Soory, but I can not find the difference. If I understand correct you suggest to create a table TTreeLocations with a primary key LocationID and an ObjectID that now has to refer different tables, street, park ...
It is no problem to use 1 sequence for all referred tables street, park and so on, but how can I write a constraint, that ensures, that my ObjectID is to be found in (exactly) one of these tables?
Thank you
Andreas Mosmann
-- wenn email, dann AndreasMosmann <bei> web <punkt> deReceived on Fri Mar 28 2008 - 04:43:00 CDT