Re: The Theoretical Foundations of the Relational Model

From: JRStern <JXSternChangeX2R_at_gte.net>
Date: Mon, 24 Jun 2002 00:40:37 GMT
Message-ID: <3d1666c3.35718780_at_news.verizon.net>


On 23 Jun 2002 16:24:07 +0200, hidders_at_hcoss.uia.ac.be (Jan.Hidders) wrote:
>> A nice essay overall, but I have quibbles about some, and am afraid you
>> were a bit unsympathetic to the claim that the object model has to utility
>> and truth outside of the relational model.
>
>I don't think that this is what was claimed. The point is that the
>relational model is well founded in mathematics, logic and philosophy when
>it comes to modelling a universe of discourse. If OO people claim that they
>have a better model for this then they need to be at least aware of this and
>show what is wrong with this foundation.

Don't get me wrong, I am a strong advocate of the relational model, and agree that some huge percentage of work in OO seems bent on reinventing the wheel, usually poorly.

>However, for other things than modelling universes of discourse such as
>programming the (there's only one?) object model might be fine, Paul's
>article didn't claim anything about that.

Well, his language suggested that relational theory captures rationality entire, leaving no need and no place for other theories.

>>> When we point to a group of propositions with an identical structure
>>> (refering to the same kinds of things in the same relationship to one
>>> another) we label that group a 'relation'. It doesn't really matter
>>> what order they appear in, or what order the elements appear in.
>>
>> An oversimplification popular amongst relational theorists. Doesn't
>> matter to whom?
>
>Yes, it doesn't matter to whom.

Find me the first person who lives on Elm Street, deterministically, in a relational system. It matters to me. Yes, sure, you can add some additional ordering field if that is a requirement, but if the requirement is very common (and it is), then the statement that order does not matter, was at best misleading.

> It is a fundamental assumption in logic that
>all your information is in you predicates; the world is described by a set of
>statements ("Die Welt ist alles, was der Fall ist") and nothing else. If you
>introduce some kind of order over statements you introduce predicates over
>predicates and you step into the wonderful world of higher order logic. That
>is a big step that introduces a whole new range of complexities.

Nobody said it would be easy.

>>> Why? Because we can reason about the propositions contained
>>> within relations in an orderly, deterministic fashion.
>>
>>Not unless you order them first.
>
>You don't need to presume order to be able to reason in first order logic.
>Of course you will have to order things if you want to represent them in a
>computer or on paper, but that is besides the point.

See above. There are many assumptions in the statement that first order logic has a unique solution for any well-formed statement. The validity of the data must always be questioned. If that means we need to extend into modal logics or second order logics, so be it.

>>> The whole sum of Ted Codd's great insight is that all of the
>>> programming language stuff about 'references' and 'identity' and
>>> 'order' can (and should) be eliminated without losing any
>>> representational power.
>>
>> And that's the big, black hole in relational theory: identity.
>
>No it isn't.

Yes it is.

> It's dealt with by the requirement that relations need a
>primary key and that domain values are identified by their representation.

There's a big debate these days on just what a primary key is for. In olden days, it was supposed to be the unique specifier for the real-world object, which again assumes there is such a thing, say "Smith, Jane". Disregarding the problems of there being lots of "Smith, Jane" there is the question of what happens when she gets married and (in cases where it still occurs) changes her name. Cascading updates, to be sure, but there are places that does not do the trick.

Hence, these days, a lot of practitioners, whatever the merit of the thing, use a synthetic primary key for every table. This is sort of a half-assed attempt to introduce identity into the relational model, where you would say it does not need to be, or was already present. The situation is entirely muddled.

IMHO, this is an issue on which the relational school has been too dogmatic for too long, irrespective of OOP issues.

>Clear and simple. (Perhaps too simple, but that is another discussion.) The
>way that OO models usually deal with identity is introducing all kinds of
>equalities such as shallow equality, deep equality, structural equality or
>even allow the user to redefine equality for certain classes as he or she
>sees fit.

It just may be the case that all of there are necessary. Yes, it would be good to have some solid theoretical work on the issue, taxonomizing, translating, and explicating why this should be so. However, I'm willing to grant that all these OOP hackers are not entirely misguided.

>> And it's not clear that relational theory people are interested in
>> anything but relational theory, that's just human nature.
>
>As Paul's article showed, the relational model rests upon a long tradition
>of trying to represent and reason about the world, and that is what the
>"relational theory people" are interested in. I could just as well claim
>that it is not clear that "OO people" are interested in anything but OO
>programming. That is also not really true, but I believe it is not a
>coincidence that you were talking about OO programming where you should have
>been talking about OO *modelling*.

Yes, yes, it's all a case of, "the difference between theory and practice is greater in practice than it is in theory." People tend to concentrate on one or the other.

I'm generally in favor of beating OOP hackers about the head and shoulders regarding the foundation and merits of relational database theory and practice, but one wants to make the case honestly if the intent is really constructive.

Joshua Stern Received on Mon Jun 24 2002 - 02:40:37 CEST

Original text of this message