Re: Multiple-Attribute Keys and 1NF

From: Brian Selzer <brian_at_selzer-software.com>
Date: Thu, 30 Aug 2007 19:25:04 -0400
Message-ID: <klIBi.531$4J3.64_at_newssvr22.news.prodigy.net>


"JOG" <jog_at_cs.nott.ac.uk> wrote in message news:1188498134.110552.184040_at_i13g2000prf.googlegroups.com...
> On Aug 30, 6:41 pm, "Brian Selzer" <br..._at_selzer-software.com> wrote:

[big snip]
>> > Are we agreed up to there?
>>
>> Not exactly. What you have are the roles Name and Language which appear
>> as
>> free variables in the predicate Speaks. A sentence in FOL is a closed
>> formula, for example,
>>
>> exists Name exists Language Speaks(Name,Language)
>
> Well that is certainly one possibility, and of course I realise that
> it is how Codd prescribed encoding a proposition in his 1969 paper. I
> am suggesting that:
>
> Ex has_Name(x, persons_name) -> speaks_language(x, language)
>
> is an equally valid, if not better option. Why? Because we can
> explicitly incorporate attribute names (which remember Codd just
> bolted on, redefining a mathematical relation in the process), and
> secondly the key is clearly expressed (all attributes to the left of
> the ->) - there is no need for a magic header.
>

I won't go here, since you've already realized that Name isn't a key. It is true that Name multidetermines Language, however.

>>
>> where each quantifier binds a free variables in Speaks. Supposing that
>> the
>> domains for Name and Language are,
>>
>> Names {Jim, Brian, Sue} and
>> Languages {English, German, French}
>>
>> respectively, an interpretation of the sentence gives,
>>
>> Speaks(Jim,English) /\
>> Speaks(Jim,German) /\
>> ~Speaks(Jim,French) /\
>> Speaks(Brian,English) /\
>> ~Speaks(Brian,German) /\
>> ~Speaks(Brian,French) /\
>> ~Speaks(Sue,English) /\
>> ~Speaks(Sue,German) /\
>> ~Speaks(Sue,French)
>
> Aye, but where have those all important attribute names disappeared
> to?
>

They are encoded in the predicate Speaks. It is not important to know the exact composition of the predicate Speaks, other than that the only free variables that appear in it are Name and Language. The parameterized notation above is easier to write yet conveys the same information than

(Speaks such that Name := Jim and Language := English) /\ (Speaks such that Name := Jim and Language := German) /\ ...etc....

>>
>> Which under the closed world assumption becomes,
>>
>> Speaks(Jim,English) /\
>> Speaks(Jim,German) /\
>> Speaks(Brian,English)
>>
>> From this it can be deduced that Jim speaks both English and German, and
>> that Jim and Brian both speak English. Under the domain closure
>> assumption,
>> it can be deduced that Sue does not exist, and that the only languages
>> that
>> exist are English and German. Sue can exist and French can exist, but
>> since
>> neither are referenced, neither does. It should be noted that just
>> because
>> Brian exists and German exists doesn't mean that Brian speaks German.
>> The
>> truth value for Speaks(Brian,German) was assigned false under the given
>> interpretation.
>
> I understand this view, but all CWA (imo) should do is tell us that
> no /propositions/ exist discussing sue. Surely we want a database
> that, if we ask it whether sue exists, responds "not as far as I've
> been told" instead of "no definitely not. no sireee. never ever"?
>

But that's more of an open world view, which shades the meaning of every aspect of the database. I'm not saying it is wrong, but it should be understood, then, that the content in the database is limited to what is known to be true instead of what is actually true. It also provides a basis for 3VL, since by accepting the open world interpretation, you are accepting that there can be facts that are not known.

Also, it's not "never ever," but rather "definitely not in this picture of reality."

>>
>> > If so then [P1] ^ [P2] gives us (via
>> > composition):
>> > Name(x, Jim) -> speaks_language(x, English) ^ speaks_language(x,
>> > English)
>>
>> > and we are left with a sentence that has two distinct roles, one of
>> > which appears twice. All of this sort of thinking has been driven by a
>> > distaste us having to add a magic 'header' component to a relation
>> > (probably as a consequence of reading pascal's work), and the desire
>> > to bring roles back into the equation.
>>
>> >> But you can
>> >> certainly assign a set of values to a variable that expects a set of
>> >> values,
>> >> since a set is a value! And you can certainly have a predicate with
>> >> free
>> >> variables that range over relations and free variables that range over
>> >> individuals--it's just that the predicate is no longer first order.
>
>
Received on Fri Aug 31 2007 - 01:25:04 CEST

Original text of this message