Re: two nasty schemata, union types and surrogate keys

From: Brian <brian_at_selzer-software.com>
Date: Tue, 20 Oct 2009 20:09:49 -0700 (PDT)
Message-ID: <23f87734-084c-47c7-b476-9e8a44c4f725_at_r36g2000vbn.googlegroups.com>


On Oct 20, 11:11 am, David BL <davi..._at_iinet.net.au> wrote:
> On Oct 20, 9:14 pm, Brian <br..._at_selzer-software.com> wrote:
>
>
>
>
>
> > On Oct 19, 10:19 pm, David BL <davi..._at_iinet.net.au> wrote:
>
> > > Consider two external predicates p1, p2 (where "external" means they
> > > are informally described in natural language) satisfying
>
> > >     for all X, p1(X) --> p2(X)
>
> > > E.g.
>
> > >     p1(X) :- X is a frog currently on display in
> > >         the San Diego zoo
>
> > >     p2(X) :- X is an amphibian currently on display
> > >         in the San Diego zoo
>
> > > A relvar recording p1 under the CWA can also be regarded as recording
> > > p2 under the OWA.
>
> > Not a good idea.
>
> That's only because the OWA sucks. There is no information whatsoever
> about why data is missing. In this case under OWA we aren't told we
> have only recorded the amphibians that happen to be frogs.
>
> > p1 implies p2 but p2 does not imply p1.
>
> That's exactly what lies behind the distinction between OWA and CWA.

No. It isn't. A closed-world database consisting of two relations with predicates p1 and p2 and an inclusion dependency from the relation with predicate p1 to the relation with predicate p2 satisfies the constraint that p1 implies p2 but p2 does not imply p1. The constraints defined on a database determines which tuples or combinations of tuples can appear in the database at any given time-- independent of whether the CWA or the OWA is applied. The distinction between the CWA and the OWA involves just whether or not the absence of one or more of those tuples is significant.

>
> > Consider:
>
> >     p3(X) :- X is a salamander currently on display
> >         in the San Diego zoo
>
> > It would be best to represent p1, p2 and p3 as separate relation
> > schemata.  The implicative relationships from p1 to p2 and from p3 to
> > p2 would then be best represented as inclusion dependencies.
>
> What's best depends on the requirements.

Maybe I should have used 'it would be better...' instead of 'it would be best....'

>
> > > Putting it another way, it is often the case that by "narrowing" the
> > > external predicate one can turn an OWA into a CWA.
>
> > > E.g. there may be a relvar for which the following gives an OWA:
>
> > >     p2(X) :- X is currently an employee of Acme Co
>
> > > whereas the following gives a CWA:
>
> > >     p1(X) :- It is known to the HR department that X is currently
> > >         an employee of Acme Co.
>
> > In this example, p1 is closed with respect to what is known to be
> > true, not what is supposed to be true.
>
> Actually p1 designates an *external* predicate.  It is meaningless to
> ask whether p1 is open/closed.  External predicates are defined
> independently of databases.
>
> It is a *relvar* within a database which is open/closed with respect
> to some external predicate.
>

Not sure what you mean here.

> When you say "what is known to be true" you make it sound like that
> has some absolute, universal significance.  But consider:
>
>    p0(X) :- It is known by Fred that it is known to the
>        HR department that X is currently an employee
>        of Acme Co.
>
> Fred could create a database with a relvar that is closed with respect
> to p0 and open with respect to p1.- Hide quoted text -
>
> - Show quoted text -

I find it hard to believe that you can't recognize the difference between what is supposed to be true and what is known to be true. Received on Wed Oct 21 2009 - 05:09:49 CEST

Original text of this message