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

From: Aloha Kakuikanu <aloha.kakuikanu_at_yahoo.com>
Date: 7 Nov 2006 16:13:36 -0800
Message-ID: <1162944816.727112.274140_at_e3g2000cwe.googlegroups.com>


NENASHI, Tegiri wrote:
> Aloha Kakuikanu wrote:
> > 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.

You are counting legs?

Seriously, this second view is perfectly updatable. Suppose we insert 'JanHidders' into the RealPeople. Then, in the view we see that a record

{(name='JanHidders', typ='RMI')}

is added. (The "typ" is the name of the second attribute in the view -- I forgot to put an alias in the view definition).

Now we have one more record in the set

RealPeople minus Impostors

while the sets

Impostors minus RealPeople
and
Impostors intersect RealPeople

remain the same. What does it mean? It means that view insertion translates into the RealPeople table insertion. Received on Wed Nov 08 2006 - 01:13:36 CET

Original text of this message