dbTalk Databases Forums  

teaching relational basics to people, questions

comp.databases.theory comp.databases.theory


Discuss teaching relational basics to people, questions in the comp.databases.theory forum.



Reply
 
Thread Tools Display Modes
  #41  
Old   
Mr. Scott
 
Posts: n/a

Default Re: teaching relational basics to people, questions - 12-12-2009 , 05:37 PM






"paul c" <toledobythesea (AT) oohay (DOT) ac> wrote

Quote:
Mr. Scott wrote:
...

In a typical table,

CTRS {COURSE, TEACHER, ROOM, STUDENT},

each row states that a particular COURSE is taught by a particular
TEACHER
in a particular ROOM to a particular STUDENT.

Now, while it can be argued that there can't be a course without a
teacher,
or that there can't be a course without a student, or that there can't be
a
student without a teacher, the room exists independent of whether there
is a
course, or a teacher or a student. It therefore follows that locating
the
fact that 'there is a room <ROOM>' only in table CTRS is a problem
because
then there could only be a room whenever there is at least one course and
at
least one teacher and at least one student. When one inserts a row into
an
empty CTRS, one effectively asserts

...
that 'there is a room <ROOM>,' ...

This presumes that the predicate for a table R { ROOM } is the same as the
predicate of CTRS { ROOM } but from the dbms perspective it's patent they
can't be, since R and CTRS don't even have the same heading. If CTRS is
not base, maybe you can say such but if it is base, one can only assert
that there exists some teacher, student and course such that room <ROOM
is involved.

There is no table R. The only place in the database to record assertions
that there is a particular room is in CTRS, but one cannot assert that there
is a particular room without also asserting that there is a particular
teacher, that there is a particular student, and that said teacher is
teaching a particular course to said student in that room.

Quote:
If you disagree that all of these assertions are a consequence of
inserting a single row, then how is it that there can be an answer to the
query, "is course <COURSE> held in room <ROOM>?" Unless there is the
possibility that 'course <COURSE> is held in room <ROOM>,' there can be
no answer (at least not a yes or a no) to the query.
...

If CTRS is base, that question is strictly not answerable.
Yes, it is answerable. The fact that a particular teacher is teaching a
particular student a particular course in a particular room implies the fact
that that particular course is held in that particular room.

Quote:
I suspect that the man in the street might think such a query is possible
(not to mention many db designers) but to be precise I think it's
important to distinguish what is from what could be, otherwise we lapse
into mysticism. A query that is answerable from CTRS is "are there some
teachers and students such that course <COURSE> and room <ROOM> are
involved?".
I think you're assuming that it is possible for there to be courses in rooms
even if there aren't any students or teachers, but that hasn't been
established, and in fact since there is no place in the database for such
assertions, there cannot be courses in rooms without students or teachers.
The queries that are answerable are therefore not limited to just those that
involve all four attributes.

If there were a place in the database for such assertions, such as a table

CR {COURSE,ROOM}

Then what is in the database would consist of the logical sum of all courses
in rooms without students or teachers and all courses in rooms with students
and teachers. The query "Is course <COURSE> held in room <ROOM>?" would
involve both CR and CTRS, unless there is an inclusion dependency from
CTRS[COURSE,ROOM] to CR[COURSE,ROOM], in which case the query could be
answered without involving CTRS.

Quote:
Just because SQL and the like might not be expressive enough to prevent
the query doesn't mean the most basic condition, ie., the definition of
CTRS, can be ignored. A language that might reflect this might have two
sets of operands for projection instead of one.

(I also realize that the usual explanations of projection operators don't
make this clear. Not that table/relvar names carry any significance other
than as a device to segregate rows/tuples according to predicate but it
might be more suggestive of the actual situation if the name of CTRS were
changed to 'EXPELLED'.)

Table names are significant. There can be more than one table with the same
set of columns. The closest logical analog to a table name is a predicate
symbol. Predicate symbols are significant.

P(X) may be true for a given X even if Q(X) is false for the same X.

Reply With Quote
  #42  
Old   
paul c
 
Posts: n/a

Default Re: teaching relational basics to people, questions - 12-13-2009 , 02:10 PM






Mr. Scott wrote:
Quote:
"paul c" <toledobythesea (AT) oohay (DOT) ac> wrote in message
newsASUm.55772$Db2.7870 (AT) edtnps83 (DOT) ..
Mr. Scott wrote:
...
In a typical table,

CTRS {COURSE, TEACHER, ROOM, STUDENT},

each row states that a particular COURSE is taught by a particular
TEACHER
in a particular ROOM to a particular STUDENT.

Now, while it can be argued that there can't be a course without a
teacher,
or that there can't be a course without a student, or that there can't be
a
student without a teacher, the room exists independent of whether there
is a
course, or a teacher or a student. It therefore follows that locating
the
fact that 'there is a room <ROOM>' only in table CTRS is a problem
because
then there could only be a room whenever there is at least one course and
at
least one teacher and at least one student. When one inserts a row into
an
empty CTRS, one effectively asserts

...
that 'there is a room <ROOM>,' ...
This presumes that the predicate for a table R { ROOM } is the same as the
predicate of CTRS { ROOM } but from the dbms perspective it's patent they
can't be, since R and CTRS don't even have the same heading. If CTRS is
not base, maybe you can say such but if it is base, one can only assert
that there exists some teacher, student and course such that room <ROOM
is involved.


There is no table R. The only place in the database to record assertions
that there is a particular room is in CTRS, but one cannot assert that there
is a particular room without also asserting that there is a particular
teacher, that there is a particular student, and that said teacher is
teaching a particular course to said student in that room.

If you disagree that all of these assertions are a consequence of
inserting a single row, then how is it that there can be an answer to the
query, "is course <COURSE> held in room <ROOM>?" Unless there is the
possibility that 'course <COURSE> is held in room <ROOM>,' there can be
no answer (at least not a yes or a no) to the query.
...
If CTRS is base, that question is strictly not answerable.

Yes, it is answerable. The fact that a particular teacher is teaching a
particular student a particular course in a particular room implies the fact
that that particular course is held in that particular room.

I suspect that the man in the street might think such a query is possible
(not to mention many db designers) but to be precise I think it's
important to distinguish what is from what could be, otherwise we lapse
into mysticism. A query that is answerable from CTRS is "are there some
teachers and students such that course <COURSE> and room <ROOM> are
involved?".

I think you're assuming that it is possible for there to be courses in rooms
even if there aren't any students or teachers, but that hasn't been
established, and in fact since there is no place in the database for such
assertions, there cannot be courses in rooms without students or teachers.
The queries that are answerable are therefore not limited to just those that
involve all four attributes.

If there were a place in the database for such assertions, such as a table

CR {COURSE,ROOM}

Then what is in the database would consist of the logical sum of all courses
in rooms without students or teachers and all courses in rooms with students
and teachers. The query "Is course <COURSE> held in room <ROOM>?" would
involve both CR and CTRS, unless there is an inclusion dependency from
CTRS[COURSE,ROOM] to CR[COURSE,ROOM], in which case the query could be
answered without involving CTRS.

Just because SQL and the like might not be expressive enough to prevent
the query doesn't mean the most basic condition, ie., the definition of
CTRS, can be ignored. A language that might reflect this might have two
sets of operands for projection instead of one.

(I also realize that the usual explanations of projection operators don't
make this clear. Not that table/relvar names carry any significance other
than as a device to segregate rows/tuples according to predicate but it
might be more suggestive of the actual situation if the name of CTRS were
changed to 'EXPELLED'.)


Table names are significant. There can be more than one table with the same
set of columns. The closest logical analog to a table name is a predicate
symbol. Predicate symbols are significant.

P(X) may be true for a given X even if Q(X) is false for the same X.



Perhaps the most remarkably bald of these assertions is that a
'particular ROOM' has 'independent' 'existence' when a 'particular'
STUDENT or TEACHER or COURSE doesn't. I've never even liked the word
'exists'... 'forall' is okay but 'is present' would help keep one's eye
on the ball. To avoid the chronic mystical persuasion, basically all we
really need to be concerned with is the presence of symbols.

Reply With Quote
  #43  
Old   
compdb@hotmail.com
 
Posts: n/a

Default Re: teaching relational basics to people, questions - 12-13-2009 , 02:16 PM



On Dec 11, 1:29 pm, Kevin Kirkpatrick <kvnkrkpt... (AT) gmail (DOT) com> wrote:
Quote:
Hello Mr. Scott,
If I'm understanding your explanation properly, in a database with
only table:
BIG_US_CITIES {CITY_NAME, STATE_CODE}
(that is, lacking table STATES {STATE_CODE}) one must logically infer,
from the CWA, that states with no big cities, e.g. 'RI', do not exist?
On Dec 11, 1:36 pm, Gene Wirchenko <ge... (AT) ocis (DOT) net> wrote:
Quote:
Effectively yes.
On Dec 11, 8:15 pm, "Mr. Scott" <do_not_re... (AT) noone (DOT) com> wrote:
Quote:
There isn't anywhere to record the assertion that there is a
state with no big cities, so there can't be any.
It is more reasonable to say that the database is silent about the
existence of states and cities. But even if it did, the inference that
some state doesn't exist is wrong.

If the predicate is "the city named city_name in state state_code is
big", then what you know is that for every tuple <c, s> in
big_us_cities "city named c in state s is big", and that (by the cwa)
for every tuple <c, s> typed by but not in in big_us_cities "it is not
the case that: the city named c in state s is big". (Maybe there is
no such named city anywhere; or maybe there's one in one or more in
other states; and/or maybe they're just not big; or there's no such
state; or that city in s is small; etc.) (If it were the case, the
tuple would have been in the relation. The use of this interpretation
of relations, which is done in a relational dbms and the relational
algebra needs in order to answer queries, is "assuming a closed
world".) This particular database (ie relation variable plus
predicate) has nothing to say about the existence of states or cities.
There is no way to write a relation expression whose predicate
involves existence starting from only the given predicate.

Now, if the user is allowed to assume (which they would using the
everyday meaning of the predicate above) that "exists c: the city
named c in state s is big" implies "there is a state named s" then
they could reason from <c,s> being in big_us_cities that "there is a
state named s". But from <c,s> not in big_us_cities they still
couldn't infer that "s is not a state". (Maybe there's just no such
city; or it's small in state s; etc.)

Note that the database has no idea what the predicate is, let alone
what "big" means or what a "state" is or the consequences (like
"existence") of there being or not being a big city named c in state
s. With this relation and predicate you can write a query that tells
you whether (ie its predicate is) for some city c "there exists an s
such that the city named c in state s is big". But there is no query
that answers "is there a state s". (But I told you how to derive it).

This should not be surprising since if we change the predicate for
big_us_cities to "the number of characters in string city_name is not
the age of any dog whose tag says state_id" we wouldn't expect any
query to give a different answer for any given value of big_us_cities.
Regarding silence on existence, we also wouldn't expect any such
change if we do add explicit information about existence.

Also regarding non-existence: Suppose existence is made explicit by
the predicate being something like "state state_code exists and city
city_name exists in that state and that city is big". Then when <c, s>
is in big_us_cities you know "state s exists" because it follows from
"state s exists and ...". But if <c,s> is not in big_us_cities you
still don't know which (one or more) of the conjuncts is false to make
the whole thing false. You only know the whole predicate is fakse
using <c,s>. So you don't know that "state s doesn't exist".

philip

Reply With Quote
  #44  
Old   
compdb@hotmail.com
 
Posts: n/a

Default Re: teaching relational basics to people, questions - 12-14-2009 , 02:33 PM



On Dec 4, 4:26 pm, com... (AT) hotmail (DOT) com wrote:
Quote:
So please start out with what the designer gives, then tell me clearly
how to form the proposition is that is "the information represented by
each row" that is syntactically valid, then what the proposition is
that is "the information content of a table".
On Dec 11, 12:07*am, com... (AT) hotmail (DOT) com wrote:
Quote:
Thanks, but this is no clearer.
Mr. Scott,

I received an early xmas gift from my database designer: a relational
dbms. Its database has relation variables vr{A,B,C,D} and vs{A,X} with
respective predicates pr(A,B,C,D) and ps(A,X). Observing the world I
can determine for a particular tuple whether a given predicate is true
with corresponding attributes/parameters substituted. All attributes
are of the same type.

At some point when the database reflects the world:

If pr(a,b,c,d) is true, what does this imply about the tuples in vr?
If pr(a,b,c,d) is false, what does this imply about the tuples in vr?
If a tuple <a,b,c,d> is in vr, what does this imply about the world,
in terms of pr?
If a tuple <a,b,c,d> is not in vr, what does this imply about the
world, in terms of pr?
What does vr imply about the world?
What does the database imply about the world?

What query (relation expression) returns:
The set of tuples <a,b,c,d> for which pr(a,b,c,d)?
The set of tuples <b,c,d> for which there exists an A such that pr
(A,b,c,d)?
The set of tuples <a,b,c,d,x> for which pr(a,b,c,d) and ps(a,x)?
The set of tuples <a,b,c,d> for which pr(a,b,c,d) and not ps
(a',b',c',d')?

Each of the following queries returns a relation. For each query, what
does the returned value imply about the world?
vr
vr project all but {A}
vr join vs
vr minus relation{A a',B b',C c',D d'}

Maybe you don't consider these to be appropriate questions. If so
please give precise rules mapping between the world and the database
state and between queries and predicates.

philip

Reply With Quote
  #45  
Old   
Mr. Scott
 
Posts: n/a

Default Re: teaching relational basics to people, questions - 12-14-2009 , 07:39 PM



<compdb (AT) hotmail (DOT) com> wrote

Quote:
On Dec 11, 1:29 pm, Kevin Kirkpatrick <kvnkrkpt... (AT) gmail (DOT) com> wrote:
Hello Mr. Scott,
If I'm understanding your explanation properly, in a database with
only table:
BIG_US_CITIES {CITY_NAME, STATE_CODE}
(that is, lacking table STATES {STATE_CODE}) one must logically infer,
from the CWA, that states with no big cities, e.g. 'RI', do not exist?

On Dec 11, 1:36 pm, Gene Wirchenko <ge... (AT) ocis (DOT) net> wrote:
Effectively yes.

On Dec 11, 8:15 pm, "Mr. Scott" <do_not_re... (AT) noone (DOT) com> wrote:
There isn't anywhere to record the assertion that there is a
state with no big cities, so there can't be any.

It is more reasonable to say that the database is silent about the
existence of states and cities. But even if it did, the inference that
some state doesn't exist is wrong.
No, it isn't wrong. An assertion that there is a state with no big cities
is inconsistent with the definition of the database: it cannot be true.

<snip>

Reply With Quote
  #46  
Old   
Mr. Scott
 
Posts: n/a

Default Re: teaching relational basics to people, questions - 12-15-2009 , 05:13 AM



Quote:
compdb (AT) hotmail (DOT) com> wrote in message
news:d84d3f25-b398-4c35-b97d-9155baaefab4 (AT) o9g2000prg (DOT) googlegroups.com...
On Dec 4, 4:26 pm, com... (AT) hotmail (DOT) com wrote:
So please start out with what the designer gives, then tell me clearly
how to form the proposition is that is "the information represented by
each row" that is syntactically valid, then what the proposition is
that is "the information content of a table".

On Dec 11, 12:07 am, com... (AT) hotmail (DOT) com wrote:
Thanks, but this is no clearer.

Mr. Scott,

I received an early xmas gift from my database designer: a relational
dbms. Its database has relation variables vr{A,B,C,D} and vs{A,X} with
respective predicates pr(A,B,C,D) and ps(A,X). Observing the world I
can determine for a particular tuple whether a given predicate is true
with corresponding attributes/parameters substituted. All attributes
are of the same type.

At some point when the database reflects the world:

If pr(a,b,c,d) is true, what does this imply about the tuples in vr?
the fact that there is an (a,b,c,d) such that pr (a,b,c,d) is represented
in the database as the tuple {A:a,B:b,C:c,D:d} in vr.

Quote:
If pr(a,b,c,d) is false, what does this imply about the tuples in vr?
the fact that there is not an (a,b,c,d) such that pr (a,b,c,d) is
represented
in the database as the absence of the tuple {A:a,B:b,C:c,D:d} in vr.

Quote:
If a tuple <a,b,c,d> is in vr, what does this imply about the world,
in terms of pr?
that there is an (a,b,c,d) such that pr (a,b,c,d).

Quote:
If a tuple <a,b,c,d> is not in vr, what does this imply about the
world, in terms of pr?
that there is not an (a,b,c,d) such that pr (a,b,c,d).

Quote:
What does vr imply about the world?
that there can be an (A,B,C,D) such that pr (A,B,C,D)

Quote:
What does the database imply about the world?
that there can be an (A,B,C,D) such that pr (A,B,C,D) OR there can be an
(A,X) such that ps (A,X)

(you didn't specify whether there is an inclusion dependency from vr[A] to
vs[A], so the logical connective is OR).

Quote:
What query (relation expression) returns:
The set of tuples <a,b,c,d> for which pr(a,b,c,d)?
The set of tuples <b,c,d> for which there exists an A such that pr
(A,b,c,d)?
The set of tuples <a,b,c,d,x> for which pr(a,b,c,d) and ps(a,x)?
The set of tuples <a,b,c,d> for which pr(a,b,c,d) and not ps
(a',b',c',d')?
You are being inconsistent. Is <a,b,c,d> a tuple or a set of tuples?

Quote:
Each of the following queries returns a relation. For each query, what
does the returned value imply about the world?
vr
forall A forall B forall C forall D,
which (A,B,C,D) are such that pr (A,B,C,D)?

Quote:
vr project all but {A}
This is really beyond the scope of a single newsgroup post, but,

assuming that A,B,C,D are free in pr,

pr (A,B,C,D) IFF (((pr A) B) C) D IFF (pr A) (B,C,D)

so vr project all but {A} is

forall A forall B forall C forall D,
which (B,C,D) are such that (pr A) (B,C,D)?

Quote:
vr join vs
forall A forall B forall C forall D forall X,
which (A,B,C,D,Z) are such that pr(A,B,C,D) and ps(A,X)?

Quote:
vr minus relation{A a',B b',C c',D d'}
forall A forall B forall C forall D,
which (A,B,C,D) are such that pr (A,B,C,D)
and not (A = a' and B = b' and C = c' and D = d')?

Quote:
Maybe you don't consider these to be appropriate questions. If so
please give precise rules mapping between the world and the database
state and between queries and predicates.

philip

Reply With Quote
  #47  
Old   
Roy Hann
 
Posts: n/a

Default Re: teaching relational basics to people, questions - 12-15-2009 , 05:34 AM



Mr. Scott wrote:

Quote:
compdb (AT) hotmail (DOT) com> wrote in message
news:f8fb0e4b-100a-4466-b968-5099852ecaa4 (AT) 2g2000prl (DOT) googlegroups.com...
On Dec 11, 1:29 pm, Kevin Kirkpatrick <kvnkrkpt... (AT) gmail (DOT) com> wrote:
Hello Mr. Scott,
If I'm understanding your explanation properly, in a database with
only table:
BIG_US_CITIES {CITY_NAME, STATE_CODE}
(that is, lacking table STATES {STATE_CODE}) one must logically infer,
from the CWA, that states with no big cities, e.g. 'RI', do not exist?

On Dec 11, 1:36 pm, Gene Wirchenko <ge... (AT) ocis (DOT) net> wrote:
Effectively yes.

On Dec 11, 8:15 pm, "Mr. Scott" <do_not_re... (AT) noone (DOT) com> wrote:
There isn't anywhere to record the assertion that there is a
state with no big cities, so there can't be any.

It is more reasonable to say that the database is silent about the
existence of states and cities. But even if it did, the inference that
some state doesn't exist is wrong.

No, it isn't wrong. An assertion that there is a state with no big cities
is inconsistent with the definition of the database: it cannot be true.
I really do hesitate to comment on this ever more imbecilic thread, but
this is a kind of discussion that always gets my goat.

Relational databases (and being generous, I will include SQL databases)
use logic and set theory to manage human testimony about the world. We
are not required to deny our own certain knowledge to satisfy the
machinations of the DBMS. It is the DBMS that is constrained to use the
closed world hypothesis, not us. But knowing that it is constrained in
that way, we are obliged to design databases to accomodate what we
know is true, and to never tell us anything we know is untrue.

But we have to accept that a DBMS can't tell us all that we know is
true. We human users are never obliged to use a closed world when we
interpret the result of a query.

--
Roy

Reply With Quote
  #48  
Old   
Mr. Scott
 
Posts: n/a

Default Re: teaching relational basics to people, questions - 12-15-2009 , 07:37 AM



"paul c" <toledobythesea (AT) oohay (DOT) ac> wrote

Quote:
Mr. Scott wrote:
"paul c" <toledobythesea (AT) oohay (DOT) ac> wrote in message
newsASUm.55772$Db2.7870 (AT) edtnps83 (DOT) ..
Mr. Scott wrote:
...
In a typical table,

CTRS {COURSE, TEACHER, ROOM, STUDENT},

each row states that a particular COURSE is taught by a particular
TEACHER
in a particular ROOM to a particular STUDENT.

Now, while it can be argued that there can't be a course without a
teacher,
or that there can't be a course without a student, or that there can't
be a
student without a teacher, the room exists independent of whether there
is a
course, or a teacher or a student. It therefore follows that locating
the
fact that 'there is a room <ROOM>' only in table CTRS is a problem
because
then there could only be a room whenever there is at least one course
and at
least one teacher and at least one student. When one inserts a row
into an
empty CTRS, one effectively asserts

...
that 'there is a room <ROOM>,' ...
This presumes that the predicate for a table R { ROOM } is the same as
the predicate of CTRS { ROOM } but from the dbms perspective it's patent
they can't be, since R and CTRS don't even have the same heading. If
CTRS is not base, maybe you can say such but if it is base, one can only
assert that there exists some teacher, student and course such that room
ROOM> is involved.


There is no table R. The only place in the database to record assertions
that there is a particular room is in CTRS, but one cannot assert that
there is a particular room without also asserting that there is a
particular teacher, that there is a particular student, and that said
teacher is teaching a particular course to said student in that room.

If you disagree that all of these assertions are a consequence of
inserting a single row, then how is it that there can be an answer to
the query, "is course <COURSE> held in room <ROOM>?" Unless there is
the possibility that 'course <COURSE> is held in room <ROOM>,' there
can be no answer (at least not a yes or a no) to the query.
...
If CTRS is base, that question is strictly not answerable.

Yes, it is answerable. The fact that a particular teacher is teaching a
particular student a particular course in a particular room implies the
fact that that particular course is held in that particular room.

I suspect that the man in the street might think such a query is
possible (not to mention many db designers) but to be precise I think
it's important to distinguish what is from what could be, otherwise we
lapse into mysticism. A query that is answerable from CTRS is "are
there some teachers and students such that course <COURSE> and room
ROOM> are involved?".

I think you're assuming that it is possible for there to be courses in
rooms even if there aren't any students or teachers, but that hasn't been
established, and in fact since there is no place in the database for such
assertions, there cannot be courses in rooms without students or
teachers. The queries that are answerable are therefore not limited to
just those that involve all four attributes.

If there were a place in the database for such assertions, such as a
table

CR {COURSE,ROOM}

Then what is in the database would consist of the logical sum of all
courses in rooms without students or teachers and all courses in rooms
with students and teachers. The query "Is course <COURSE> held in room
ROOM>?" would involve both CR and CTRS, unless there is an inclusion
dependency from CTRS[COURSE,ROOM] to CR[COURSE,ROOM], in which case the
query could be answered without involving CTRS.

Just because SQL and the like might not be expressive enough to prevent
the query doesn't mean the most basic condition, ie., the definition of
CTRS, can be ignored. A language that might reflect this might have two
sets of operands for projection instead of one.

(I also realize that the usual explanations of projection operators
don't make this clear. Not that table/relvar names carry any
significance other than as a device to segregate rows/tuples according
to predicate but it might be more suggestive of the actual situation if
the name of CTRS were changed to 'EXPELLED'.)


Table names are significant. There can be more than one table with the
same set of columns. The closest logical analog to a table name is a
predicate symbol. Predicate symbols are significant.

P(X) may be true for a given X even if Q(X) is false for the same X.




Perhaps the most remarkably bald of these assertions is that a 'particular
ROOM' has 'independent' 'existence' when a 'particular' STUDENT or TEACHER
or COURSE doesn't. I've never even liked the word 'exists'... 'forall' is
okay but 'is present' would help keep one's eye on the ball. To avoid the
chronic mystical persuasion, basically all we really need to be concerned
with is the presence of symbols.
The idea that symbols can be 'present' is very strange. For each table in a
database there is a collection of assertions that can be represented by a
row in the table. Some of those assertions may be true, and some may be
false, but the symbols from which those assertions are composed are always
'present' regardless of whether the assertions are true or not. They are
part of the language. The non-logical symbols of a typical first-order
language consists of a set of predicate symbols of various arities, a set of
function symbols of various arities, and a set of variable names. Arbitrary
propositions are 0-ary predicate symbols. Constants are 0-ary function
symbols. The idea that those sets of symbols can somehow change undermines
the basis of the logic. Moreover, the unique name assumption demands that
everything that has a name has one and only one name for all time, but if
the pool of names can change, then there's no longer any guarantee that the
name of something won't be different at some future time.

I think you're continual reference to mysticism is misplaced. Ignorance may
be bliss, but it has no place in database theory. It is a mistake to
deliberately ignore the fact that since databases can change, the
propositions represented by the rows that can be in the database must
concern concrete rather than abstract objects, since abstract objects are
independent of time. Propositions that concern abstract objects are either
necessarily true or necessarily false, so they have no place in a
time-varying relation. Think:

P -> (~#~P /\ ~#P): P implies possibly P but not necessarily P.

Every proposition that can be represented by a row in the database has to
have a similar form. If the contents of a table can change, then the
propositions that can be represented by a row in the table must be possible
but not necessary, and the only way they can be possible but not necessary
is if they concern concrete rather than abstract objects.

Probably the most important property of concrete objects is that they have
lifetimes. They can come into existence and they can cease to exist. This
is not mysticism: it is a logical consequence of the fact that the contents
of a table can change. But I understand your dislike of 'exists' as a
quantifier. I prefer to use 'there is' instead of 'there exists,' not
because there is something mystical about actual existence, but because a
fixed domain is easier to work with, especially for temporal data. A fixed
domain includes everything that ever was, everything that actually is, and
everything that can ever be. When the domain is fixed, the collection of
assertions that can be represented in the database is also fixed, so the
determination of which are represented at a given time is as simple as
assigning a truth value to each. There is no need to extend every time
there is an update. For example, suppose that someone tries to insert a row
for part '123455,' but there actually is no part '123455.' The row is
inconsistent with the database because there is no part '123455' in the
domain of parts, so there wouldn't be any propositions in the extension that
concern part '123455,' but what if someone at some later time defines a part
'123455?' At that time the row would be consistent because the part
'123455' would be in the domain of parts. How would the information that
'123455' is in the domain of parts be maintained so that consistency can be
ensured? Domains are not tables. One can't insert values into a domain
without altering the database scheme. However, with a fixed domain, it is
always the case that '123455' can be a part, and the fact that '123455'
actually is a part would have to be recorded in a table somewhere in the
database. It is also a simple matter with a fixed domain to represent
something in the database that no longer actually exists or something that
may occur in the future.

Reply With Quote
  #49  
Old   
Kevin Kirkpatrick
 
Posts: n/a

Default Re: teaching relational basics to people, questions - 12-15-2009 , 12:02 PM



On Dec 15, 4:34*am, Roy Hann <specia... (AT) processed (DOT) almost.meat> wrote:
Quote:
Mr. Scott wrote:

com... (AT) hotmail (DOT) com> wrote in message
news:f8fb0e4b-100a-4466-b968-5099852ecaa4 (AT) 2g2000prl (DOT) googlegroups.com...
On Dec 11, 1:29 pm, Kevin Kirkpatrick <kvnkrkpt... (AT) gmail (DOT) com> wrote:
Hello Mr. Scott,
If I'm understanding your explanation properly, in a database with
only table:
BIG_US_CITIES {CITY_NAME, STATE_CODE}
(that is, lacking table STATES {STATE_CODE}) one must logically infer,
from the CWA, that states with no big cities, e.g. 'RI', do not exist?

On Dec 11, 1:36 pm, Gene Wirchenko <ge... (AT) ocis (DOT) net> wrote:
* * *Effectively yes.

On Dec 11, 8:15 pm, "Mr. Scott" <do_not_re... (AT) noone (DOT) com> wrote:
There isn't anywhere to record the assertion that there is a
state with no big cities, so there can't be any.

It is more reasonable to say that the database is silent about the
existence of states and cities. But even if it did, the inference that
some state doesn't exist is wrong.

No, it isn't wrong. *An assertion that there is a state with no big cities
is inconsistent with the definition of the database: it cannot be true.

I really do hesitate to comment on this ever more imbecilic thread, but
this is a kind of discussion that always gets my goat.

Relational databases (and being generous, I will include SQL databases)
use logic and set theory to manage human testimony about the world. *We
are not required to deny our own certain knowledge to satisfy the
machinations of the DBMS. *It is the DBMS that is constrained to use the
closed world hypothesis, not us. *But knowing that it is constrained in
that way, we are obliged to design databases to accomodate what we
know is true, and to never tell us anything we know is untrue.

But we have to accept that a DBMS can't tell us all that we know is
true. *We human users are never obliged to use a closed world when we
interpret the result of a query.

--
Roy- Hide quoted text -

- Show quoted text -
In the real world, I qualify the results of all queries as, "According
to the database [inference from the query]". I'll recast my point in
this light. My question on this thread was: given a database with
only one relvar BIG_US_CITIES {CITY, STATE} and associated predicate
"<CITY> is a big city in the state of <STATE>", if I run a query with
selection "STATE='Rhode Island'" and get no rows back, should I
interpret this result as:

A: "According to the database, Rhode Island is not a state" or
B: "According to the database, there are no large cities in Rhode
Island"

Mr. Scott is [I believe] claiming that both of these are valid
interpretations of the query result. I'd argue that only the latter
interpretation valid, and feel the example itself shows mine to be the
more sensible approach.

Reply With Quote
  #50  
Old   
Mr. Scott
 
Posts: n/a

Default Re: teaching relational basics to people, questions - 12-15-2009 , 12:40 PM



"Roy Hann" <specially (AT) processed (DOT) almost.meat> wrote

Quote:
Mr. Scott wrote:


compdb (AT) hotmail (DOT) com> wrote in message
news:f8fb0e4b-100a-4466-b968-5099852ecaa4 (AT) 2g2000prl (DOT) googlegroups.com...
On Dec 11, 1:29 pm, Kevin Kirkpatrick <kvnkrkpt... (AT) gmail (DOT) com> wrote:
Hello Mr. Scott,
If I'm understanding your explanation properly, in a database with
only table:
BIG_US_CITIES {CITY_NAME, STATE_CODE}
(that is, lacking table STATES {STATE_CODE}) one must logically infer,
from the CWA, that states with no big cities, e.g. 'RI', do not exist?

On Dec 11, 1:36 pm, Gene Wirchenko <ge... (AT) ocis (DOT) net> wrote:
Effectively yes.

On Dec 11, 8:15 pm, "Mr. Scott" <do_not_re... (AT) noone (DOT) com> wrote:
There isn't anywhere to record the assertion that there is a
state with no big cities, so there can't be any.

It is more reasonable to say that the database is silent about the
existence of states and cities. But even if it did, the inference that
some state doesn't exist is wrong.

No, it isn't wrong. An assertion that there is a state with no big
cities
is inconsistent with the definition of the database: it cannot be true.

I really do hesitate to comment on this ever more imbecilic thread, but
this is a kind of discussion that always gets my goat.

Relational databases (and being generous, I will include SQL databases)
use logic and set theory to manage human testimony about the world. We
are not required to deny our own certain knowledge to satisfy the
machinations of the DBMS. It is the DBMS that is constrained to use the
closed world hypothesis, not us. But knowing that it is constrained in
that way, we are obliged to design databases to accomodate what we
know is true, and to never tell us anything we know is untrue.

But we have to accept that a DBMS can't tell us all that we know is
true. We human users are never obliged to use a closed world when we
interpret the result of a query.

You're missing the point. The constraints that define the database clearly
and precisely specify what can and cannot be true in the context of the
database. That context is the micro-world that the database is supposed to
model, which may or may not be a subset of the real world. It might even be
a completely fictional world, but within that context, only assertions that
are consistent with the definition of the database can be true. The above
mentioned database is concerned only with states with big cities because
there is only a place for assertions about states with big cities, and in
that context, there can be no states with no big cities--even though we know
that in reality there are indeed states with no big cities.

Quote:
--
Roy


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.