Re: OO and relation "impedance mismatch"

From: Alan <not.me_at_uhuh.rcn.com>
Date: Sun, 03 Oct 2004 13:58:45 GMT
Message-ID: <pAT7d.3360$L91.1608_at_trndny01>


"Fredrik Bertilsson" <fredrik_bertilsson_at_passagen.se> wrote in message news: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.

It was, and that is a good portion of the problem.

 If you had designed the object model by yourself, would you
> really design a model that you have described?

Of course not.

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.
>

Do you mean the OO programming paradigm COULD be used with RDBs or could NOT be used? I beleive the OO programming paradigm CAN be used with RDBs, without the superimposition of the OO data structure that I am now stuck with. It just places the burden of keeping track of the correct version of the data on the input side instead of on the data extraction side. Hmmmm... that sounds familiar...

> Fredrik,
> http://butler.sourceforge.net
Received on Sun Oct 03 2004 - 15:58:45 CEST

Original text of this message