Re: Object-relational impedence

From: Bob Badour <>
Date: Wed, 05 Mar 2008 11:24:39 -0400
Message-ID: <47cebb3c$0$4035$>

H. S. Lahman wrote:

> Responding to JOG...

>>> All attempts by applications to access a DB's tables and columns
>>> directly violates design principles that guard against close-coupling.
>>> This is a basic design tenet for OO.  Violating it when jumping from OO
>>> to RDB is, I think, the source of problem that are collectively and
>>> popularly referred to as the object-relational impedance mismatch.
>> I wondered if we might be able to come up with some agreement on what
>> object-relational impedence mismatch actually means. I always thought
>> the mismatch was centred on the issue that a single object != single
>> tuple, but it appears there may be more to it than that.

> First, I think it is important to clarify that the 'relational' in the
> mismatch isn't referring to the fact that the OO paradigm uses something
> other than set theory's relational model. The nature of the impedance
> mismatch lies in the way the OO and RDB paradigms implement the same
> relational model.

Frankly, the paragraph above is nonsense.

> I think the lack of 1:1 tuple mapping is just a symptom of the mismatch.
> There are several contributors to the mismatch...
> Applications (not just OO) are designed to solve specific problems so
> they are highly tailored to the particular problem in hand. In contrast,
> databases are designed to provide ad hoc, generic access to data that is
> independent of particular problem contexts. If one had to choose a
> single characterization of the mismatch, this would be it; everything
> else stems from it.
> Object properties include behavior. Behaviors interact in much more
> complex ways than data. Managing behaviors is the primary cause of
> failing to map 1:1 between OO Class Diagrams and Data Models of the same
> subject matter. That's because managing behavior places additional
> constraints on the way the software is constructed.

The above three paragraphs are not much better.

> OO relationships are instantiated at the object (tuple) level rather
> than the class (table) level.

Equating object instances with tuples and object classes with relations is a great blunder. One of two great blunders detailed in Date's and Darwen's _The Third Manifesto_.

A tuple is actually a logical join of N object values. An object class extent is a unary relation. OO has no concept equal to a binary relation--let alone an n-ary relation.

[remaining nonsense snipped] Received on Wed Mar 05 2008 - 16:24:39 CET

Original text of this message