Re: Object-relational impedence
Date: Sun, 16 Mar 2008 21:57:07 -0700 (PDT)
Message-ID: <3bee9691-9037-424f-a038-d69c4eeb6016_at_f63g2000hsf.googlegroups.com>
On 16 Mar, 20:49, Robert Martin <uncle..._at_objectmentor.com> wrote:
> On 2008-03-14 00:17:40 -0500, frebe <freb..._at_gmail.com> said:
>
> > On 13 Mar, 18:40, Robert Martin <uncle..._at_objectmentor.com> wrote:
> >> The real point of that remark was that the user of a tool is at a
> >> higher level of abstraction than the tool itself. SQL is a tool. ORM
> > s
> >> are tools that use SQL to get their job done, just like compilers use
> >> assembly to get their job done. In that sense ORMs live at a higher
> >> level of abstraction than SQL.
>
> > Lets have an example: There are many "compiler" products translating
> > from a high-level language like ADA to a low-level language like C,
> > instead of translating to machine code directly. What if someone wrote
> > a "compiler" translating C source code to ADA source code, would that
> > make C more high level than ADA? Hardly? The existance of a product
> > translating from language A to language B doesn't say anything about
> > the levels of A and B.
>
> That's a good point. The fact that you can write a translator from
> A->B does not mean A is higher level than B. On the other hand, when A
> *truly is* higher level than B, there is a lot of leverage to be gained
> by using A instead of B.
Which is obviously not the case for ORM and SQL. It is very hard (or impossible) to write a good ORM and many developers had learned the difficulties with using an ORM, the hard way. There is not a lot of leverage to be gained by using an ORM instead of SQL.
> > If a RDBMS product is implemented using an OOPL, does that make
> > relational algebra more high level than OO?
>
> Yes. I think this is obvious on the face of it. RDBs are a much
> higher level concept than Java, or C++, or OO in general. OO is *code*.
SQL are also code, but indeed on a higher level.
> On the other hand, ORMs are higher level than RDBs (not better .. level
> is not a value judgement) because ORMs make use of RDBs in order to
> achieve a specific intent.
We have already concluded that the fact that tool A uses tools B, doesn't say anything about the level between A and B.
//frebe Received on Mon Mar 17 2008 - 05:57:07 CET