Re: OO and relation "impedance mismatch"

From: Fredrik Bertilsson <fredrik_bertilsson_at_passagen.se>
Date: 2 Oct 2004 22:29:33 -0700
Message-ID: <31f7e57d.0410022129.9877a38_at_posting.google.com>


"Alan" <not.me_at_uhuh.rcn.com> wrote in message news:<SpB7d.4289$ae7.2460_at_trndny07>...
> I am stuck
> with working with an OO schema superimposed on an RDBMS. The amount of
> gymnastics I need to go through to do what should be the simplest query is
> unimaginable.

Yes, I know this is a common scenario. But I think this problem is caused by a design mistake. OO purists are claiming that the object model should be design before the (or without respect to) the database schema. If you had designed the object model by yourself, would you really design a model that you have described? Anyway I would make (or generate) one class for each table and use SQL queries for retrieving records/objects. Why can't tables and records be considered as "objects"? I think OO evangelists have caused this impedance mismatch by themself. I can't see why the OO programming paradigm could be used together with relational databases.

Fredrik,
http://butler.sourceforge.net Received on Sun Oct 03 2004 - 07:29:33 CEST

Original text of this message