The meaning of "Impedance Mismatch".

You've probably heard the term Impedance Mismatch thrown around when discussing object relational mapping. I'm sure it comes up every morning at the water cooler. Maybe you've even thrown it around yoursef a few times. Do you know what the term means?

Object relational mapping refers to the process of mapping your relational data model to your object model. Object Spaces is a highly publicized framework for doing just that. The mismatch I refer to is a result of the differences in structure between a normalized relational database and a typical object oriented class hierarchy. One might say Databases are from Mars and Objects are from Venus. Databases do not map naturally to object models. It's alot like trying to push the north poles of two magnets together.

Interestingly enough, the term "Impedance", now bandied about in software engineering circles, is borrowed from electronics. I'm going to do a disservice to electrical engineers all over the world by offering a a very simple explanation. (My aplogies to you EEs out there).

Impedance is the measure of the amount that some object impedes (or obstructs) the flow of a current. Impedance might refer to resistance, reactance, or some complex combination of the two.

Perhaps an example is in order to illustrate impedance mismatching:

Imagine you have a low current flashlight that normally uses AAA batteries. Don't try this at home, but suppose you could attach your car battery to the flashlight. The low current flashlight will pitifully output a fraction of the light energy that the high current battery is capable of producing. Likewise, if you attached the AAA batteries to Batman's spotlight, you'll also get low output. However, match the AAA batteries to the flashlight and they will run with maximum efficiency.

So taking this discussion back to software engineering, if you imagine the flow of data to be analogous to a current, then the impedance of a relational data model is not matched with the impedance of an object hierarchy. Therefore, the data will not flow with maximum efficiency, a result of the impedance mismatch.

What others have said

Requesting Gravatar... Bill Gates Jun 15, 2004 6:04 AM
# re: The meaning of "Impedance Mismatch".
Funny, I have not heard the term Impedance Mismatch thrown around when discussing object relational mapping. By the way, it is not polite to talk about "Impedance" in polite company.
Requesting Gravatar... Ian Griffiths Jun 15, 2004 6:44 AM
# re: The meaning of "Impedance Mismatch".
A DC situation like this isn't really where you normally talk about 'impedance mismatches'.

The situations where 'impedance mismatches' are usually used are in situations with changing signals. For example, if you have a digital signal, with the voltage changing suddenly from 0V to 3V, if the wire carrying that signal has a sudden change in impedance, you tend to get reflections bouncing back down the wire.

So if there's an impedance mismatch, signals get messed up as they cross the mismatched boundary. I think this situation is somewhat closer in spirit to the way that 'impedance mismatch' is used in O/R mapping examples.
Requesting Gravatar... Haacked Jun 15, 2004 2:37 PM
# re: The meaning of "Impedance Mismatch".
Good point. I should come up with a better example. With DC, we're more likely to talk about Resistance since the Reactance part of the equation will be 0 or close to 0.
Requesting Gravatar... Radu Grigore Jun 16, 2004 12:00 AM
# re: The meaning of "Impedance Mismatch".
In fact impedance is very similar to refraction index, the difference being that they are practicaly relevant in completely different frequency domains. An example of mismatch is: you look thru a piece of glass (let's say you are admiring a new notebook in a store) and you see, vaguely, your face. This happens because air and glass have different refractive indexes so part of the light bounces back on the separation surface between air and glass. Exactly the same thing happens to signals when they cross from one type of cable (let's sey 50ohms) to another type of cable (let's say 75 ohms).

Using "impedance mismatch" for the troubles you get when you try to fit a relational DB with an OO application is merely an analogy (while the two phenomenons presented above are actually the _same_ at a basic level).

regards,
the EE guy
Requesting Gravatar... ai Mar 02, 2005 9:53 PM
# re: The meaning of "Impedance Mismatch".
to the EE guy
how do you solve the problem of impedance mismatch as in from a 50 ohm source to a 75 ohm load
Requesting Gravatar... DonXML Demsak's All Things Techie Aug 01, 2005 10:53 AM
# Is Object Oriented Programming The Problem?
Requesting Gravatar... DonXML Demsak's All Things Techie Aug 01, 2005 10:54 AM
# Is Object Oriented Programming The Problem?
Requesting Gravatar... The guy that pays for the delays Dec 27, 2007 10:14 PM
# re: The meaning of "Impedance Mismatch".
In my experience this is a term "Architects" like to use when there is a problem with development that causes delays, also know as cost overruns.
Requesting Gravatar... ffoulks Apr 22, 2011 2:04 AM
# re: The meaning of "Impedance Mismatch".
As has been pointed out, we are dealing here with the figurative use of a technical term. (I realize that engineers have difficulty with the notion of figurative language. An example: When Shakespeare writes "I [...] trouble deaf heaven with my bootless cries ...", he is using the notion of unshodness figuratively to represent abjection. When a figurative usage becomes common enough, the term acquires a new literal meaning.)

In the very broadest sense, impedance is what happens (figuratively) between two entities when they lack some expected structural similarity. When someone says, "Well it worked on my machine, why doesn't work on the network?", we have an impedance problem. In software development, within the time gap between the release of a new database version and the release of the application version that implements it, there is an impedance. The key here is "expected". In ordinary circumstances, it is reasonable to expect the application to mirror the database. Pointing out the impedance is a polite way of dealing with some idiot who doesn't understand the difference between the database and the application.

In the case of O/R impedance: When we use an automated tool to generate a UI and its CRUD from a database, we are pretending that the UI *is* the reality the database is supposed to represent. We have ignored the actions of the real objects, and when reality sets in in the form of business rules, we end up with an ad hoc mess. We haven’t really saved time by skipping the object level.

What do you have to say?

(will show your gravatar)
Please add 7 and 3 and type the answer here: