Re: Object-relational impedence
Date: Tue, 11 Mar 2008 05:16:01 GMT
"JOG" <jog_at_cs.nott.ac.uk> wrote in message
> On Mar 3, 2:07 pm, Thomas Gagne <tga..._at_wide-open-west.com> wrote:
>> 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.
> I was hoping perhaps people might be able to offer perspectives on the
> issues that they have encountered. One thing I would like to avoid
> (outside of almost flames of course), is the notion that database
> technology is merely a persistence layer (do people still actually
> think that?) - I wonder if the 'mismatch' stems from such a
I think the mismatch has nothing to do with either. The relational camp is focused on "what;" the object camp is focused on "how." The relational camp seeks to determine whether a database state is possible; the object camp seeks to specify possible changes of state. Where the impedance comes in is that there may be multiple paths from one possible database state to another.
The focus of a programmer is to get from point A to point B. On the one hand, you can state which path you're going to take; on the other hand, you can specify which paths are valid. But just because you take a particular path doesn't necessarily mean that another path is not just as valid: there may be more than one valid path from point A to point B. But OO doesn't require that every valid path be specified--only that the paths specified be valid paths; neither does the RM have a mechanism to detect which path was taken. (Candidate keys do not necessarily rigidly designate.) This is the essence of the object-relational impedance mismatch. There would be no impedance if there were a mechanism in the RM to detect which path was taken during a transition; there would be no impedance if OO required specification of /all/ possible paths. If it were possible to detect which path was taken, then it should be possible to determine the set of all valid paths; if all valid paths were specified, it should be possible to determine which path is being taken. Received on Tue Mar 11 2008 - 06:16:01 CET