dbTalk Databases Forums  

Undefinedness

comp.databases.theory comp.databases.theory


Discuss Undefinedness in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JOG
 
Posts: n/a

Default Undefinedness - 11-21-2007 , 07:34 AM






Word up CDT. How the devil are you all? Well, I return with a question
that as ever highlights my complete lack of formal mathematical
training, and in light of knowing no logicians in my daily life (funny
that), I was hoping that one of you kind folks might be able to
advise:

Say I had a set of 3 encoded propositions:
R := { {(Name, Tom), (Age, 42)}, {(Name, Dick), (Age, 16)}, {(Name,
Harry)} }

(note that Harry's Age is missing, so instead of adding a null, i've
intentionally just left the attribute out. Just ride with such oddness
for now if you would.)

What if I deigned to create a simple 'adults' subset of this set of
propositions, by creating a predicate that only returned the elements,
p, which contained an age attribute greater than 18. Could I state
this as (where E signifies set membership):

Adults := { p E R | EXISTSx ( x > 18 && (Age, x) E p ) }

My question obviously hinges around Harry's missing age attribute. In
this case would the EXISTSx (...) part of the set's intension simply
return a FALSE, or will I end up in the quagmire of 3VL with an
UNDEFINED? My instinct is that I am still in 2VL given there is no
null floating about, but since the recent, excellent discussions of
Jan's DEF operator, and having delved into beeson's logic of partial
terms, I am not at all confident.

Any comments are much appreciated, and regards to all, Jim.

Reply With Quote
  #2  
Old   
David Cressey
 
Posts: n/a

Default Re: Undefinedness - 11-21-2007 , 08:22 AM







"JOG" <jog (AT) cs (DOT) nott.ac.uk> wrote

Quote:
Word up CDT. How the devil are you all? Well, I return with a question
that as ever highlights my complete lack of formal mathematical
training, and in light of knowing no logicians in my daily life (funny
that), I was hoping that one of you kind folks might be able to
advise:

Say I had a set of 3 encoded propositions:
R := { {(Name, Tom), (Age, 42)}, {(Name, Dick), (Age, 16)}, {(Name,
Harry)} }

(note that Harry's Age is missing, so instead of adding a null, i've
intentionally just left the attribute out. Just ride with such oddness
for now if you would.)

What if I deigned to create a simple 'adults' subset of this set of
propositions, by creating a predicate that only returned the elements,
p, which contained an age attribute greater than 18. Could I state
this as (where E signifies set membership):

Adults := { p E R | EXISTSx ( x > 18 && (Age, x) E p ) }

My question obviously hinges around Harry's missing age attribute. In
this case would the EXISTSx (...) part of the set's intension simply
return a FALSE, or will I end up in the quagmire of 3VL with an
UNDEFINED? My instinct is that I am still in 2VL given there is no
null floating about, but since the recent, excellent discussions of
Jan's DEF operator, and having delved into beeson's logic of partial
terms, I am not at all confident.

Any comments are much appreciated, and regards to all, Jim.
I'm no mathematician or logician, but I'll answer anyway.

To me, it dpends on whether the relationship (Name, Age) follows the open
world assumption or the closed world assumption. If it's the closed world
assumption, then we would have to say that Harry is not included with the
adults. However, if we defined another set, Children,

Children := { p E R | EXISTSx ( x < 19 && (Age, x) E p ) }

Please note that Harry is excluded from Children as well.

If we had a rule that says that every person mentioned in R is either a
child or an adult, that would be tantamount to requiring that the entry for
Harry be rejected at time of insertion.

BTW, I see nothing odd about your notation. NULLS are not needed. Hwever,
your proposition R actually contains two propositions: first that the named
person exists, and second that the person named with an age has that age.






Reply With Quote
  #3  
Old   
Bob Badour
 
Posts: n/a

Default Re: Undefinedness - 11-21-2007 , 10:50 AM



JOG wrote:
Quote:
Word up CDT. How the devil are you all? Well, I return with a question
that as ever highlights my complete lack of formal mathematical
training, and in light of knowing no logicians in my daily life (funny
that), I was hoping that one of you kind folks might be able to
advise:

Say I had a set of 3 encoded propositions:
R := { {(Name, Tom), (Age, 42)}, {(Name, Dick), (Age, 16)}, {(Name,
Harry)} }

(note that Harry's Age is missing, so instead of adding a null, i've
intentionally just left the attribute out. Just ride with such oddness
for now if you would.)

What if I deigned to create a simple 'adults' subset of this set of
propositions, by creating a predicate that only returned the elements,
p, which contained an age attribute greater than 18. Could I state
this as (where E signifies set membership):

Adults := { p E R | EXISTSx ( x > 18 && (Age, x) E p ) }

My question obviously hinges around Harry's missing age attribute. In
this case would the EXISTSx (...) part of the set's intension simply
return a FALSE, or will I end up in the quagmire of 3VL with an
UNDEFINED? My instinct is that I am still in 2VL given there is no
null floating about, but since the recent, excellent discussions of
Jan's DEF operator, and having delved into beeson's logic of partial
terms, I am not at all confident.

Any comments are much appreciated, and regards to all, Jim.
I look at it and ask: Does the pair exist? And the answer of course is No.


Reply With Quote
  #4  
Old   
Marshall
 
Posts: n/a

Default Re: Undefinedness - 11-21-2007 , 03:50 PM



On Nov 21, 5:34 am, JOG <j... (AT) cs (DOT) nott.ac.uk> wrote:
Quote:
Word up CDT.
Hey homes. 'Sup?


Quote:
How the devil are you all?
Damn well, thanks. You?


Quote:
What if I deigned to create a simple 'adults' subset of this set of
propositions, by creating a predicate that only returned the elements,
p, which contained an age attribute greater than 18. Could I state
this as (where E signifies set membership):

Adults := { p E R | EXISTSx ( x > 18 && (Age, x) E p ) }

My question obviously hinges around Harry's missing age attribute. In
this case would the EXISTSx (...) part of the set's intension simply
return a FALSE, or will I end up in the quagmire of 3VL with an
UNDEFINED? My instinct is that I am still in 2VL given there is no
null floating about, but since the recent, excellent discussions of
Jan's DEF operator, and having delved into beeson's logic of partial
terms, I am not at all confident.

Any comments are much appreciated, and regards to all, Jim.
<insert my usual disclaimer about any such question depending
on the semantics of the system under discussion.>

I'd say it's the first one.

Some offhand thoughts:

I believe this example is isomorphic to Jan's DEF constructor.

You can think of any function as data instead of code. So you
could remap EXISTS in your example into data. Here, I use
_ as a "don't care" value.

R := { {(Name, Tom), (Age, true, 42)},
{(Name, Dick), (Age, true, 16)},
{(Name, Harry), (Age, false, _} }

You can decompose this in to two relations, and make Age
an optional attribute using the usual technique of having the
Age table use a foreign key to the Name table as a primary
key. (6NF?) In which case, you can see that the Age table
is then a table of ages of people for whom we know their
age. This brings us right back to David's response, and the
importance of the CWA. So the best query we can do is ask
what people do we know to be adults; we cannot ask who the
adults are among the people we know. It's not just that we
can't get the answer; we can't even ask the question, because
there's no way to write that query.)


Marshall


Reply With Quote
  #5  
Old   
JOG
 
Posts: n/a

Default Re: Undefinedness - 11-22-2007 , 11:39 AM



On Nov 21, 2:22 pm, "David Cressey" <cresse... (AT) verizon (DOT) net> wrote:
Quote:
"JOG" <j... (AT) cs (DOT) nott.ac.uk> wrote in message

news:84c11971-6500-48e4-ba0f-b8b659f390da (AT) d61g2000hsa (DOT) googlegroups.com...



Word up CDT. How the devil are you all? Well, I return with a question
that as ever highlights my complete lack of formal mathematical
training, and in light of knowing no logicians in my daily life (funny
that), I was hoping that one of you kind folks might be able to
advise:

Say I had a set of 3 encoded propositions:
R := { {(Name, Tom), (Age, 42)}, {(Name, Dick), (Age, 16)}, {(Name,
Harry)} }

(note that Harry's Age is missing, so instead of adding a null, i've
intentionally just left the attribute out. Just ride with such oddness
for now if you would.)

What if I deigned to create a simple 'adults' subset of this set of
propositions, by creating a predicate that only returned the elements,
p, which contained an age attribute greater than 18. Could I state
this as (where E signifies set membership):

Adults := { p E R | EXISTSx ( x > 18 && (Age, x) E p ) }

My question obviously hinges around Harry's missing age attribute. In
this case would the EXISTSx (...) part of the set's intension simply
return a FALSE, or will I end up in the quagmire of 3VL with an
UNDEFINED? My instinct is that I am still in 2VL given there is no
null floating about, but since the recent, excellent discussions of
Jan's DEF operator, and having delved into beeson's logic of partial
terms, I am not at all confident.

Any comments are much appreciated, and regards to all, Jim.

I'm no mathematician or logician, but I'll answer anyway.

To me, it dpends on whether the relationship (Name, Age) follows the open
world assumption or the closed world assumption.
While I was only really concerned about whether my logic statements
are sticking to 2VL internally, you've sent me off at a tangent here
because CWA is one of my bugbears. Imho its at best silly, and at
worst contradictory. Take relations such as:

Weather_is = { condition: Hot }
Weather_is_not = { condition: Cold }
Domain = {Hot, Cold}

Perfectly fine with full information, and a constraint that a
condition can't appear in both. And I can happily extrapolate from CWA
from the first relation that: !is(condition:cold)), and from the
second !is_not(condition:hot). Nice...

....until we're faced missing information. If both relations are empty
(because we just don't have the data say), then CWA tells me that:
!Weather_is(condition:Hot) and !Weather_is_not(condition:Hot). It is
both hot and not hot. Genius. I don't see how CWA based directly on
what propositions state can ever be justified for a system working in
the real world (TM).

Equally CWA would suggest that Harry is neither a child nor an adult
in the other example. Meh.

I am hence of the opinion that we should stick to OWA, or better still
a CWA that is aware it is only commenting on the _existence of
propositions_ themselves, and not the underlying truth of their
contents (preventing us asking questions with contradictory answers in
the first place).

Quote:
If it's the closed world
assumption, then we would have to say that Harry is not included with the
adults. However, if we defined another set, Children,

Children := { p E R | EXISTSx ( x < 19 && (Age, x) E p ) }

Please note that Harry is excluded from Children as well.

If we had a rule that says that every person mentioned in R is either a
child or an adult, that would be tantamount to requiring that the entry for
Harry be rejected at time of insertion.

BTW, I see nothing odd about your notation.
Huzzah

Quote:
NULLS are not needed. Hwever,
your proposition R actually contains two propositions: first that the named
person exists, and second that the person named with an age has that age.
True, and full decomposition to 6NF would be a valid approach. But one
that can add an unpleasant amount of joins. Theoretically no problem
of course, but who realistically fancies writing queries with n joins
just because you don't have complete information for a single entry
say... And lets be honest, when in the real world is any attribute
100% guaranteed to not going to have some missing data at some point?


Reply With Quote
  #6  
Old   
JOG
 
Posts: n/a

Default Re: Undefinedness - 11-22-2007 , 11:56 AM



On Nov 21, 9:50 pm, Marshall <marshall.spi... (AT) gmail (DOT) com> wrote:
Quote:
On Nov 21, 5:34 am, JOG <j... (AT) cs (DOT) nott.ac.uk> wrote:

Word up CDT.

Hey homes. 'Sup?
Er...yo, shizzle? Nope, I'm afraid that's it, i've run out of street
lingo already

Quote:
How the devil are you all?

Damn well, thanks. You?
Tip top. Getting married, and thats turning out to be a ridiculous
amount of work, but there you go. (let me preempt any cries of "don't
do it you eejut" in advance).

Quote:


What if I deigned to create a simple 'adults' subset of this set of
propositions, by creating a predicate that only returned the elements,
p, which contained an age attribute greater than 18. Could I state
this as (where E signifies set membership):

Adults := { p E R | EXISTSx ( x > 18 && (Age, x) E p ) }

My question obviously hinges around Harry's missing age attribute. In
this case would the EXISTSx (...) part of the set's intension simply
return a FALSE, or will I end up in the quagmire of 3VL with an
UNDEFINED? My instinct is that I am still in 2VL given there is no
null floating about, but since the recent, excellent discussions of
Jan's DEF operator, and having delved into beeson's logic of partial
terms, I am not at all confident.

Any comments are much appreciated, and regards to all, Jim.

insert my usual disclaimer about any such question depending
on the semantics of the system under discussion.

I'd say it's the first one.

Some offhand thoughts:

I believe this example is isomorphic to Jan's DEF constructor.
That was my hope. If I could get the same functionality without
introducing a new operator, well that seemed like a worthwhile goal.

Quote:
You can think of any function as data instead of code. So you
could remap EXISTS in your example into data. Here, I use
_ as a "don't care" value.

R := { {(Name, Tom), (Age, true, 42)},
{(Name, Dick), (Age, true, 16)},
{(Name, Harry), (Age, false, _} }

You can decompose this in to two relations, and make Age
an optional attribute using the usual technique of having the
Age table use a foreign key to the Name table as a primary
key. (6NF?) In which case, you can see that the Age table
is then a table of ages of people for whom we know their
age. This brings us right back to David's response, and the
importance of the CWA. So the best query we can do is ask
what people do we know to be adults; we cannot ask who the
adults are among the people we know. It's not just that we
can't get the answer; we can't even ask the question, because
there's no way to write that query.)
CWA confuses me... in an RDBMS does it merely apply to a truth
statement about a propositions existence, or directly as to whether
the content of that proposition is true? If I decomposed to 6NF say,
and hence omitted a tuple for harry's age, woudn't an RDBMS deem harry
to have no age at all, rather than stating it just doesn't have a
proposition about the matter? Someone straighten me up.

It seems that it might be nice to have a rule setup as a virtual
relation that everyone who is a person has an age, whether the db
knows what that is or not. Perhaps something as simple as:
HasAge := { p | p E People }


Quote:
Marshall
Regards, J.


Reply With Quote
  #7  
Old   
Bob Badour
 
Posts: n/a

Default Re: Undefinedness - 11-22-2007 , 02:10 PM



JOG wrote:

Quote:
On Nov 21, 9:50 pm, Marshall <marshall.spi... (AT) gmail (DOT) com> wrote:

On Nov 21, 5:34 am, JOG <j... (AT) cs (DOT) nott.ac.uk> wrote:

Word up CDT.

Hey homes. 'Sup?

Er...yo, shizzle? Nope, I'm afraid that's it, i've run out of street
lingo already


How the devil are you all?

Damn well, thanks. You?

Tip top. Getting married, and thats turning out to be a ridiculous
amount of work, but there you go. (let me preempt any cries of "don't
do it you eejut" in advance).
Congratulations! Pass along to your fiancee that I told her: "Don't do
it you eejut!" (Marriage is generally a better deal for him than for her.)


Reply With Quote
  #8  
Old   
joelle.alcock@gmail.com
 
Posts: n/a

Default Re: Undefinedness - 11-22-2007 , 08:22 PM



On Nov 23, 1:10 am, paul c <toledobythe... (AT) ooyah (DOT) ac> wrote:
Quote:
paul c wrote:
paul c wrote:
...

Wait a minute. Regarding "weather_is", its complement is
(!Weather_is(condition:hot)) AND ((!Weather_is(condition:cold)). This
is not the same as just !Weather_is(condition:hot).
...

Oops, bloody parentheses. Should have said
!((Weather_is(condition:hot)) AND (Weather_is(condition:cold))).

...

Sorry again, I think the first was right all along, in English (I hope)
that would be "neither" (is true) which is what I should have said in
the first place. Maybe I should try to sit on my messages for a few
days until I get them right.
I understand your point Paul, although I deliberately omitted the
whole complement given that
(!Weather_is(condition:hot)) AND ((!Weather_is(condition:cold)) = true
=> !Weather_is(condition:hot)


Reply With Quote
  #9  
Old   
JOG
 
Posts: n/a

Default Re: Undefinedness - 11-22-2007 , 09:48 PM



On Nov 23, 2:22 am, joelle.alc... (AT) gmail (DOT) com wrote:
Quote:
On Nov 23, 1:10 am, paul c <toledobythe... (AT) ooyah (DOT) ac> wrote:



paul c wrote:
paul c wrote:
...

Wait a minute. Regarding "weather_is", its complement is
(!Weather_is(condition:hot)) AND ((!Weather_is(condition:cold)). This
is not the same as just !Weather_is(condition:hot).
...

Oops, bloody parentheses. Should have said
!((Weather_is(condition:hot)) AND (Weather_is(condition:cold))).

...

Sorry again, I think the first was right all along, in English (I hope)
that would be "neither" (is true) which is what I should have said in
the first place. Maybe I should try to sit on my messages for a few
days until I get them right.

I understand your point Paul, although I deliberately omitted the
whole complement given that
(!Weather_is(condition:hot)) AND ((!Weather_is(condition:cold)) = true
=> !Weather_is(condition:hot)
gnnnnn. must...check...login...


Reply With Quote
  #10  
Old   
David BL
 
Posts: n/a

Default Re: Undefinedness - 11-22-2007 , 10:17 PM



On Nov 23, 2:39 am, JOG <j... (AT) cs (DOT) nott.ac.uk> wrote:
Quote:
On Nov 21, 2:22 pm, "David Cressey" <cresse... (AT) verizon (DOT) net> wrote:





"JOG" <j... (AT) cs (DOT) nott.ac.uk> wrote in message

news:84c11971-6500-48e4-ba0f-b8b659f390da (AT) d61g2000hsa (DOT) googlegroups.com...

Word up CDT. How the devil are you all? Well, I return with a question
that as ever highlights my complete lack of formal mathematical
training, and in light of knowing no logicians in my daily life (funny
that), I was hoping that one of you kind folks might be able to
advise:

Say I had a set of 3 encoded propositions:
R := { {(Name, Tom), (Age, 42)}, {(Name, Dick), (Age, 16)}, {(Name,
Harry)} }

(note that Harry's Age is missing, so instead of adding a null, i've
intentionally just left the attribute out. Just ride with such oddness
for now if you would.)

What if I deigned to create a simple 'adults' subset of this set of
propositions, by creating a predicate that only returned the elements,
p, which contained an age attribute greater than 18. Could I state
this as (where E signifies set membership):

Adults := { p E R | EXISTSx ( x > 18 && (Age, x) E p ) }

My question obviously hinges around Harry's missing age attribute. In
this case would the EXISTSx (...) part of the set's intension simply
return a FALSE, or will I end up in the quagmire of 3VL with an
UNDEFINED? My instinct is that I am still in 2VL given there is no
null floating about, but since the recent, excellent discussions of
Jan's DEF operator, and having delved into beeson's logic of partial
terms, I am not at all confident.

Any comments are much appreciated, and regards to all, Jim.

I'm no mathematician or logician, but I'll answer anyway.

To me, it dpends on whether the relationship (Name, Age) follows the open
world assumption or the closed world assumption.

While I was only really concerned about whether my logic statements
are sticking to 2VL internally, you've sent me off at a tangent here
because CWA is one of my bugbears. Imho its at best silly, and at
worst contradictory. Take relations such as:

Weather_is = { condition: Hot }
Weather_is_not = { condition: Cold }
Domain = {Hot, Cold}

Perfectly fine with full information, and a constraint that a
condition can't appear in both. And I can happily extrapolate from CWA
from the first relation that: !is(condition:cold)), and from the
second !is_not(condition:hot). Nice...

...until we're faced missing information. If both relations are empty
(because we just don't have the data say), then CWA tells me that:
!Weather_is(condition:Hot) and !Weather_is_not(condition:Hot). It is
both hot and not hot. Genius. I don't see how CWA based directly on
what propositions state can ever be justified for a system working in
the real world (TM).

Equally CWA would suggest that Harry is neither a child nor an adult
in the other example. Meh.

I am hence of the opinion that we should stick to OWA, or better still
a CWA that is aware it is only commenting on the _existence of
propositions_ themselves, and not the underlying truth of their
contents (preventing us asking questions with contradictory answers in
the first place).

If it's the closed world
assumption, then we would have to say that Harry is not included with the
adults. However, if we defined another set, Children,

Children := { p E R | EXISTSx ( x < 19 && (Age, x) E p ) }

Please note that Harry is excluded from Children as well.

If we had a rule that says that every person mentioned in R is either a
child or an adult, that would be tantamount to requiring that the entry for
Harry be rejected at time of insertion.

BTW, I see nothing odd about your notation.

Huzzah

NULLS are not needed. Hwever,
your proposition R actually contains two propositions: first that the named
person exists, and second that the person named with an age has that age.

True, and full decomposition to 6NF would be a valid approach. But one
that can add an unpleasant amount of joins. Theoretically no problem
of course, but who realistically fancies writing queries with n joins
just because you don't have complete information for a single entry
say... And lets be honest, when in the real world is any attribute
100% guaranteed to not going to have some missing data at some point?
This seems closely related to the recent discussion between Jan and
myself. I think you're basically taking the Zaniolo approach to
missing information. I agree with you (and it seems obvious) that the
CWA only applies when one has complete information.



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.