Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> comp.databases.theory -> Re: Basic question?What 's the key if there 's no FD(Functional Dependencies)?

Re: Basic question?What 's the key if there 's no FD(Functional Dependencies)?

From: NENASHI, Tegiri <tnmail42_at_gmail.com>
Date: 7 Nov 2006 12:26:20 -0800
Message-ID: <1162931180.480569.141780@m73g2000cwd.googlegroups.com>

Aloha Kakuikanu wrote:
> NENASHI, Tegiri wrote:
> > Aloha Kakuikanu wrote:
> > > This conclusion is unsatisfactory. The view is updatable.
> >
> > To complete my response that I gave before. I did not see that the
> > union view that you gave had a element that is not in the database.
> > The union view is a coproduct in the category language. Generally, the
> > coproduct is not updatable but if one injects an element that is not in
> > the database like one of the legs of the coproduct, it will be
> > updatable. The universal property of updatability that the functor
> > F:Mon(V)==>Mon(E) must be left and right fibration is honored. The
> > proof is easy. Like I recollect the SQL union is never updatable.
>
> Oh, phlease. Sampo already gave you a reason why category theory is
> wrong abstraction level for the database theory in general.

I do not find his reason very persuasive. The reason it is very "in general" ;) But convince you, it does not interest me because if one has open mind one can see ;)

>
> I will have no difficulty producing subtle variations of the problem
> that would escape your formalism. Here we go:
>
> 1. Is the view
>
> select name, 'U' from (
> select name from RealPeople
> union
> select name from Impostors
> )
> union
> select name, 'I' from (
> select name from RealPeople
> intersect
> select name from Impostors
> )
>
> updatable?

It is easy, it is not updatable because in general the coproduct is not updatable: (realPeople + Impostors).

>
> 2. Is the view
>
> select name, 'RMI' from (
> select name from RealPeople
> minus
> select name from Impostors
> )
> union
> select name, 'IMR' from (
> select name from Impostors
> minus
> select name from RealPeople
> )
> union
> select name, 'I' from (
> select name from RealPeople
> intersect
> select name from Impostors
> )
>
> updatable?
>

I must think about 'minus' but I think it is not updatable because the two legs of the coproduct exist in the database and the coproduct like this is not updatable.

>
> BTW notice that before I was talking about updating a system of views
> (similtaneously). A simple extension operation combines a system of
> views into a single view, as you see from the above examples.

The article that you decided not to read studies arbitrary views that are defined in the sketch language but it does not give the arbitrary translation of the SQL -- one must do it by hand: union -> coproduct, join->pullback, etc.

--
Tegi
Received on Tue Nov 07 2006 - 14:26:20 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US