Re: Distributed foreign keys (was Re: Category Types)
Date: Tue, 24 Jun 2003 16:31:13 -0400
Message-ID: <bp3Ka.439$8s4.63102067_at_mantis.golden.net>
"Paul Vernon" <paul.vernon_at_ukk.ibmm.comm> wrote in message
news:bd98h4$13v8$1_at_gazette.almaden.ibm.com...
> "Bob Badour" <bbadour_at_golden.net> wrote in message
> news:tQIJa.389$8%1.57207848_at_mantis.golden.net...
> > "Paul Vernon" <paul.vernon_at_ukk.ibmm.comm> wrote in message
> > news:bd7bdg$t7g$1_at_gazette.almaden.ibm.com...
> > > "Bob Badour" <bbadour_at_golden.net> wrote in message
> > > news:kFFJa.361$ez1.56242211_at_mantis.golden.net...
> > > [snip]
> > > > This is true. However, the way one gets the data into the database
is
> > very
> > > > different. The triple-relation approach requires one to explicitly
state
> > > > which of the three relations the referenced value belongs in when
one
> > first
> > > > inserts the value. The view approach requires explicit insertion for
two
> > of
> > > > the three relations and prohibits explicit insertion in the third.
Or am
> > I
> > > > missing something?
> > >
> > > I don't like view updating...
> >
> > That should make you prefer the symmetric three-relation approach even
more
> > since it requires no views and avoids any question of updating views.
>
> I avoid any question of view updating without recourse to preferring
> particular database schemas.
>
> I prefer the closed world approach where we do not have to state what we
have
> no knowledge about (I mean, where would it all end?)
>
> [snip]
> > > I don't like view updating...
> > >
> > > .. and the fact that you can try to insert contradictory data (or
> > 'duplicate'
> > > data - whatever that might mean in the terms of the relational model)
into
> > a
> > > database is but one reason why I don't like view updating AT ALL.
> >
> > What, then, do you propose for logical independence during updates?
>
> Big question, but why restrict it to 'during updates'? In fact do you mean
> anything in particular by "logical independence during updates".
I assumed your objection to view updates was an objection to the update part and not to views themselves. Was I wrong? What do you propose for logical independence if not views?
> > One can
> > always safely attempt to insert contradictory data,
>
> Assuming one can present such contradictory data to the DBMS in the first
> place.
What would prevent one from presenting contradictory data?
> In the case of 'duplicate data', I suggest it is simply not possible to
> try to insert 'duplicate data' into a database.
Are you suggesting that "insert" should be equivalent to a union assignment without any preconditions?
> > and to ensure safety,
> > the integrity function should always make such attempts fail.
>
> I prefer to know before hand (i.e. statically) if my updates attempts will
> fail. Thowing a plausable update at the database and hoping it will stick
is
> not a great approach.
That's fine for you. However, I do not think it is a good idea to assume every user will have perfect knowledge of all constraints. It should be safe for a user to present contradictory data, which then becomes an educational opportunity. What does the integrity function provide if not such safety? Received on Tue Jun 24 2003 - 22:31:13 CEST