Re: Object-relational impedence
Date: Wed, 5 Mar 2008 10:13:59 +0100
>> 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