Re: Is this bad design ?

From: Bob Badour <bbadour_at_golden.net>
Date: Tue, 9 Mar 2004 21:30:57 -0500
Message-ID: <l-mdnVm0ycT6GdPdRVn-vA_at_golden.net>


"ben brugman" <ben_at_niethier.nl> wrote in message news:404dd972$0$3682$4d4ebb8e_at_read.news.nl.uu.net...
>
> "Fabian Buettner" <green_at_tzi.de> wrote in message
> news:404DC817.2090804_at_tzi.de...
> > If only valid mothers can have children, you could partition your Mother
> > table as follows:
> >
> > Mother( mother_id primary key, etc_fields )
> > -- all mothers
> >
> > ValidMother( mother_id primary key + foreign key ref Mother(mother_id))
> > -- "valid mother" ids
> >
> > Child( mother_id foreign key ref. ValidMother(mother_id), more_fields)
> >
> > This way you can ensure that only valid mothers are referenced by
> > children. Also (if referential integrity is available), a mother can not
> > become invalid (i.e., delete entry from ValidMother) when there are
> > still children referencing it.
>
> But then the application has to be changed.

No, it doesn't. A simple view serves the application well. Received on Wed Mar 10 2004 - 03:30:57 CET

Original text of this message