Re: The MySQL/PHP pair

From: Paul <paul_at_test.com>
Date: Fri, 05 Nov 2004 20:45:42 +0000
Message-ID: <418be676$0$561$ed2619ec_at_ptn-nntp-reader03.plus.net>


Dawn M. Wolthuis wrote:

>> But the predicate for this would be something like:
>> 
>> Person P has email addresses of E1, E2, E3, ...

>
> or
>
> Person P has the following list of e-mail addresses: L

You could say this. But then L is a "variable" (in the predicate logic sense) and not a predicate. So when we translate over to relations, L is atomic in the sense that the relational system cannot look inside it - its inner workings are only visible to the type system. This is because the relational system can only look inside predicates.

Maybe there is some system of basic logic where lists are fundamental concepts but I'm not aware of it (and I'm not being facetious here).

> and it is only if there is a question that requires a function to
> look into the values of L would we then apply that function so that
> we could ask:
>
> who has e-mail addresses at aol.com?

yes, but that function is part of the type system and not the relational system.

> Given that we can use SQL to GROUP data and if we can also UNGROUP
> data, then where does the 2nd order predicate logic come in and why
> is it a problem? Again, I really am ignorant on where we hit a wall
> with first order predicate logic and what the problem is with
> introducing additional logic to handle nesting and unnested as
> needed. Thanks for your help. --dawn

I'm struggling as well to understand exactly what it means in terms of relational database theory.

Basically I think in second-order logic your "variables" such as L above are allowed to be predicates. Whereas in first-order logic they aren't, they are just allowed to be symbols with no structure of their own visible to the logical system.

So that explains why Codd's relational theory can't have nested relations - because he chose to start with first order logic.

The second question is why not start with second order logic?

Well, its theory is a lot more complicated and you get stuff like Godel's theorems biting you with things like unprovability and incompleteness. Where I'm not totally clear is how much this has to do with infinities and whether the fact that databases are finite makes a difference, or whether their unboundedness is sufficient to cause problems.

Maybe we need to cross-post to sci.logic for some expert knowledge of this kind of thing.

Paul. Received on Fri Nov 05 2004 - 21:45:42 CET

Original text of this message