Re: How to model a foreign key that only accepts a subset of keys in Designer?

From: Andrew Hardy <nobody_at_spam.from.news.AdvanticaTech.com>
Date: Thu, 19 Sep 2002 09:13:00 +0100
Message-ID: <amc11f$f07$1_at_sun-cc204.lut.ac.uk>


Neil,

"Neil Emery" <neil.emery_at_ds-s.com> wrote in message news:3d883b9a_at_cpns1.saic.com...
> Andy
>
> For the Logical Model, I would sub-type the vehicles entity.
>
> What you are trying to show is that events can only be applied to
road-going
> vehicles.

That is true.

I did try to model as an instantiable sub-type i.e. a single table with a discriminator (and without the sub-type having an attributes of its own).

Although the model looked OK, I couldn't see anywhere that the generated tables/APIs ever enforced the relationships.

Have you tried this and did it work?

Andy

> "Andrew Hardy" <nobody_at_spam.from.news.AdvanticaTech.com> wrote in message
> news:ama0ne$smd$1_at_sun-cc204.lut.ac.uk...
> > Hi,
> >
> > I have a table of Vehicles, I also have a table that is required to
record
> > events against Vehicles *but* it is intended only for those that travel
on
> > the road.
> >
> > How can I model this (preferably in Designer) to prevent data being
> entered
> > for the non-road going vehicles?
> >
> > Andy
> > --
> > Opinions are mine and do not necessarily reflect those of Advantica
> > Technologies Ltd
> >
> >
>
>
Received on Thu Sep 19 2002 - 10:13:00 CEST

Original text of this message