Re: Is this bad design ?
Date: Thu, 11 Mar 2004 13:19:49 -0500
Message-ID: <-cudnaMjIN-fM83dRVn-jw_at_golden.net>
"ben brugman" <ben_at_niethier.nl> wrote in message
news:40505af3$0$6572$4d4ebb8e_at_read.news.nl.uu.net...
>
> "Fabian Buettner" <green_at_tzi.de> wrote in message
> news:405055BA.2020608_at_tzi.de...
> > > Suggestion A:
> > > Splitting the table in two were one table only holds the
> > > valid mothers and one table holds the non-valid mothers.
> >
> > No. One table (Mothers) contains all mothers (valid and invalid) with
> > all their attributes. The other table (ValidMothers) contains only the
> > mother_ids of valid mothers. Thus ValidMothers models a *subset* of
> > Mothers. Then, if you want a reference to only valid mothers, you can
> > reference ValidMothers.mother_id instead of Mothers.mother_id.
>
> Thanks, did my reading to quickly, sorry for that.
>
> This looks like a good solution.
> (Could be implemented in 'triggers' so that the
> application does not have to notice, if the
> 'valid field' is kept in the mother).
Why on earth would anyone use a trigger when a simple foreign key constraint will do? Received on Thu Mar 11 2004 - 19:19:49 CET
