Re: By The Dawn's Normal Light

From: Paul <paul_at_test.com>
Date: Sun, 24 Oct 2004 14:08:09 +0100
Message-ID: <417ba93a$0$33600$ed2619ec_at_ptn-nntp-reader02.plus.net>


Marshall Spight wrote:
> It's funny: the RM has no facilities for handling lists; the Pick model
> has no facilities for handling relations.
>
> Sometimes you have ordered data, and sometimes you have unordered
> data. Which primitive operations you want depends on which one
> you have. Each model handles one well and ignores the other.
>
> I propose that the ideal model would handle both, and have
> relatively simple ways of transforming one into the other.

I think the root of the problem is that lists require second-order logic. You could store a list in a relation with a predicate that says:

  Item X comes after Item Y.

together with some constraints to say that only one item can come after any given item, no item can come after itself, there must be a start item, etc. plus a special value to indicate the start of the list.

But then I think the constraint to stop loops (B follows A, C follows B, A follows C) would require second order logic. I might be wrong there though, maybe there's some clever way of doing it in first-order logic.

But you would need second order logic to query the list - for example to return all list items that were after a given list item.

So again you're bumping into the problem of the jump from first-order to second-order logic, with all the potential pitfalls that entails.

The solution is: push all the stuff that requires second-order logic out of the relational engine and into the type engine.

Paul. Received on Sun Oct 24 2004 - 15:08:09 CEST

Original text of this message