Re: Object-relational impedence
From: Dmitry A. Kazakov <mailbox_at_dmitry-kazakov.de>
Date: Wed, 5 Mar 2008 10:13:59 +0100
Message-ID: <173rn7vmv6alc.d8yy5f0qqmd0.dlg_at_40tude.net>
>
> You are confusing OO with static typing. In OO languages like Ruby,
> Python, or Smalltalk you can pass any object to any function
> irrespective of type.
Date: Wed, 5 Mar 2008 10:13:59 +0100
Message-ID: <173rn7vmv6alc.d8yy5f0qqmd0.dlg_at_40tude.net>
On Wed, 5 Mar 2008 01:10:01 -0600, Robert Martin wrote:
> On 2008-03-03 18:34:39 -0600, Marshall <marshall.spight_at_gmail.com> said:
>
>> In SQL, if I have two relations with x and y int columns, I can >> union them, or join on them, or whatever. There is no way, >> in fact, to forbid such a thing, just like in Java there is no way >> to allow such a thing.
>
> You are confusing OO with static typing. In OO languages like Ruby,
> Python, or Smalltalk you can pass any object to any function
> irrespective of type.
Nevertheless you don't need dynamic typing in order to deal with that. You could have a class of relations in order to define operations (like join) on them. That will give a static type to the result of any join.
The problem is elsewhere. How do I know in *advance* that the result of join is a relation of certain narrower kind? Both "statically untyped" SQL and "dynamically untyped" fancy languages have no answer to that until run time. Note that this is a software design issue.
-- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.deReceived on Wed Mar 05 2008 - 10:13:59 CET