Re: OO and relation "impedance mismatch"
From: Christopher Browne <cbbrowne_at_acm.org>
Date: 3 Oct 2004 18:57:32 GMT
Message-ID: <2sb0csF1ikoe9U3_at_uni-berlin.de>
Date: 3 Oct 2004 18:57:32 GMT
Message-ID: <2sb0csF1ikoe9U3_at_uni-berlin.de>
After takin a swig o' Arrakan spice grog, fredrik_bertilsson_at_passagen.se (Fredrik Bertilsson) belched out:
>> OO languages don't support the fundamental relational structure: the
>> relation. It is very evident that a language that does not support
>> relations is not very well suited to work with relational databases.
>
> But non-OO languages support relations, or?? Please give an example.
> Wouldn't it be possible to model a relation as a class? Overloaded
> operators could be used for expressing relational calculus. I think
> that OO languages is the most suited for this job.
I can see a couple of really conspicuous "impedances" to using the typical OO languages in conjunction with relational databases:
- The "collection" data structures in C++/Java do NOT have the same semantics as the sets of SQL, particularly when concurrent access/updates can take place.
- The numeric types generally available to C++/Java programmers typically do not include anything suitable for working with monetary transactions.
The old COBOL hacks can still claim a form of superiority because they have BCD math, and therefore predictable monetary calculations, whereas the typical clueless fan of the C descendants doesn't even grasp that floats are _fundamentally_ flawed.
-- (reverse (concatenate 'string "gro.gultn" "_at_" "enworbbc")) http://www3.sympatico.ca/cbbrowne/internet.html Rules of the Evil Overlord #123. "If I decide to hold a contest of skill open to the general public, contestants will be required to remove their hooded cloaks and shave their beards before entering." <http://www.eviloverlord.com/>Received on Sun Oct 03 2004 - 20:57:32 CEST