Re: Object-relational impedence

From: Dmitry A. Kazakov <mailbox_at_dmitry-kazakov.de>
Date: Mon, 17 Mar 2008 19:52:30 +0100
Message-ID: <1iwyzfdwgvfm5.1iqi1kvzfuq1x$.dlg@40tude.net>


On Mon, 17 Mar 2008 19:12:35 +0100, rpost wrote:

> Well, ordered lists are another, but they are only useful
> if no attribute can be modelled by which the ordering happens,
> and that is very rare; besides, they too can be expressed
> as relations, e.g. <element, nextelement> or <element, index>.
>
> So I agree that not having them isn't so bad.

I disagree. The idea of a container type is not merely about what it can contain (data). Observe, that under the constraint of finiteness and random memory access (or, equivalently, finiteness and an implementation of relational algebra) all containers degrade to the corresponding carrier (be it array, relation, list etc). It does not make any sense to have them in that case. (In short, that would be a sort of argument to Turing-completeness. The response to it is - yes, but irrelevant.)

The reason why different containers exist is in the behavior of, especially regarding access to the elements. This behavior constrains general access to specific ways (like stack, queue, sorted array, immutable etc), in order to provide *predictable* efficiency on *certain* types of underlying hardware/software. What you have agreed with, that the program stack can be read out, processed as a relation (item, depth), and then pushed back. Yes theoretically it could, but it never will.

-- 
Regards,
Dmitry A. Kazakov
http://www.dmitry-kazakov.de
Received on Mon Mar 17 2008 - 13:52:30 CDT

Original text of this message