Re: Something new for the New Year (2008).

From: JOG <jog_at_cs.nott.ac.uk>
Date: Mon, 7 Jan 2008 17:29:16 -0800 (PST)
Message-ID: <761b212c-ba93-4ee2-985b-9d1c450d8e26_at_c4g2000hsg.googlegroups.com>


On Jan 5, 7:59 pm, Rob <rmpsf..._at_gmail.com> wrote:
> Now I know how Charlie Brown would feel when Lucy volunteers yet again
> to hold the football for him to kick. (My apologies if you are too
> young to remember Peanuts.)
>
> Nevertheless, I believe that the path to teaching includes tolerance
> and patience, so I will try to address your questions. (With some
> quibbles about your logic and some questions for you about the
> interpretation of foreign keys in predicates.)
>
>
>
> >There is no difference between my and Marshall's views, because they
> >are just a repetition of what Codd defined the relational model to
> >be.
>
> On January 1, JOG said:
> "Tuples in databases represent facts stated in the real world (they
> are not entities or objects)".
>
> On January 3, Marshall said:
> "but as far as the RM goes, it models our ideas about real-world
> entities and our ideas about real-world relationships in exactly the
> same way: as mathematical relations".
>
> And on January 3, JOG said:
> "A tuple represents a fact as an instantiation of a predicate."
>
> Is see a big difference here, particularly because mathematical
> relations theory says nothing about predicates.

Nope no difference I'm afraid. A proposition that satisfies a predicate P(a,b,...z) is encoded as a tuple of values. All the tuples (rows) satisfying P, are collected as a set, which we call a relation (table). This is sort of database 101 really.

> I can accept that a
> tuple of a mathematical relation or a vector can be /interpreted/ as
> an existence predicate, but that still leaves the question (see below)
> of how a foreign key is (or is part of) a fact or proposition or
> predicate.
>
> >> So as long as there is no universal consensus about how
> >> relational databases and the relational model allow us to represent
>
> >But there /is/ universal consensus from people who have read the RM
> >paper.
>
> If you are speaking of Codd's 1970 paper, I've read it many times and
> I /don't/ share your beliefs. In logic, "universal" has a precise
> meaning. Unless you have some reason to exclude me from the set of
> "people who have read the RM paper", your statement is just rhetoric.
> (You could say "most" or "the majority", but you didn't.)

Then you honestly need to reread the paper Rob. Or get "Introduction to Databases" by Codd, which is more thorough and more up to data. Any database theory primer should do really.

>
> >I wonder if you are perhaps you trying to implement a different data
> >model inside of the RM mechanism (as people do with EAV)? The PKFK and
> >JT "structures" you describe correspond directly to propositions that
> >are stated in the real world, but I am at a loss as to what facts your
> >more complex A-L "structure" correspond to.
>
> I don't know what you mean when you say that 'The PKFK and JT
> "structures" you describe correspond directly to propositions that are
> stated in the real world'. I'm going to take a stab at it (next), but
> I would appreciate some enlightment from you on what fact or
> proposition the one foreign key in a PKFK representation child tuple
> stands for and what fact(s) or proposition(s) the two foreign keys in
> a JT representation stand for.
>
> IF I ASSUME THAT:
>
> a.) a value X in the foreign key in a PKFK child tuple is the fact:
> "this child tuple is related to [or included in the set of child
> tuples related to] the parent tuple whose primary key value is X";
> b.) a value pair (Y,Z) in the foreign keys in a JT tuple is the fact:
> "the parent tuple with primary key Y is related to the child tuple
> with primary key Z".
>
> THEN FOR THE A-L REPRESENTATION:
>
> c.) a value U in the parent foreign key of an aggregate tuple (in the
> Aggregate-Link representation) is the fact: "there exists an
> aggregation for which the parent tuple with primary key X has a
> distinguished role", and
> d.) a value pair (V,W) in the aggregate- and child foreign keys
> (resp.) of a link tuple (in the Aggregate-Link representation,
> associated only with the aggregate relation containing the aggregate
> tuple in c) is the fact: "the child tuple with primary key W belongs
> to the aggregation specified by the aggregate tuple with primary key
> V".
>
> This is my best guess as the answer to your (implied) question 'what
> facts [do] your more complex A-L "structure" correspond to?'. If I
> have misinterpreted the meaning of the foreign keys that you say
> 'correspond directly to propositions that are stated in the real
> world', I apologize. Explain what you mean and I'll try (yet) again.

You're way overcomplicating Rob - you sound like an OO programmer who came to databases later? Am I right? You have to forget children and parents mate, they are OO concepts and make no sense in predicate logic where there is just inference (It was a wrench for me when I had to make that leap). Anyhow, here is an example for you:

  1. UK is in Europe => (country:UK, continent:Europe)
  2. Canada is in N. America => (country:Canada, continent:N.America)
  3. Bob is 30 and lives in the UK => (name:Bob, age:30, country:UK)
  4. Sarah is 28 and lives in Canada => (name:Bob, age:30, country:UK)
  5. Bob is Married to Sarah => (husband:Bob, bride:Sarah)

According to your definitions (1) and (2) are normal propositions (3) and (4) are PKFK and (5) is a JT. Your AL structure corresponds to no statement of fact that I can think of. Regards, J.

>
> Rob
Received on Tue Jan 08 2008 - 02:29:16 CET

Original text of this message