Impedance Mismatch

What Does Impedance Mismatch Mean?

An object-relational impedance mismatch refers to a range of problems representing data from relational databases in object-oriented programming languages. The term is used by analogy with the electrical engineering term "impedance managing," where the optimal design is in most cases to have the input impedance match the output impedance for maximum power flow.


Techopedia Explains Impedance Mismatch

An impedance mismatch can occur when accessing a relational database in an object-oriented programming language. Problems can arise because object-oriented programming languages like C++ or Python have very different approaches to accessing data.

Some of these differences include:

  • Type references. Object-oriented languages make heavy use of by-reference attributes, while this is typically prohibited in relational databases. Scalar types also often differ between database and OO languages.
  • In OO languages, objects can be made up of other objects, while this is impossible in relational database languages for integrity.
  • Relational databases have well-defined primitive operations for manipulating and querying data, while OO languages have lower-level operations.
  • Relational databases have more robust approaches to transactions to preserve atomicity and consistency. The only way to guarantee this through an OO language is at the level of primitive-typed fields.

Methods to mitigate impedance mismatch include using NoSQL databases and designing relational databases with object-oriented programming languages in mind, as well as paying attention to differences between OO languages and relational databases when coding a project.


Related Terms

Margaret Rouse

Margaret Rouse is an award-winning technical writer and teacher known for her ability to explain complex technical subjects to a non-technical, business audience. Over the past twenty years her explanations have appeared on TechTarget websites and she's been cited as an authority in articles by the New York Times, Time Magazine, USA Today, ZDNet, PC Magazine and Discovery Magazine.Margaret's idea of a fun day is helping IT and business professionals learn to speak each other’s highly specialized languages. If you have a suggestion for a new definition or how to improve a technical explanation, please email Margaret or contact her…