| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: OO and relation "impedance mismatch"
On Sat, 02 Oct 2004 04:00:13 -0700, Fredrik Bertilsson wrote:
> OO people often claims that there are an impedance mismatch between
> the OO model and the relational model, that makes it very hard use a
> relational database when you are using an OO programming language.
I believe that it's true that there still are annoying obstacles which have to be taken care of when using an RDBMS as a storage backend for OO-coded programs.
Part of it probably has to do with the fact that relational databases are set-oriented whereas OO languages are not. But that - by itself - need not be a problem: Using the right tool for the right situation should always be better than trying to solve everything by one principle.
Then there is type support: Some of the data types found in - e.g. - SQL don't have out-of-the box, perfectly matching types in the major OO languages.
The above problems are not unique to the RDBMS<->OO situation. They are actually general to RDBMSes and any imperative language (that I know of).
However, I believe that the impedance mismatch is given more attention in the OO World because that World is _remarkably_ keen on OO "paradigms". Those paradigms tend to be not very well founded or defined, and there seems to be a tendency for creations of "paradigm of the year", especially in the Java World (e.g.: some years back, inheritance was cool; nowadays it's seen as very un-cool.). Sometimes, "beans" are hot; at other times, it's "agile modeling". No matter what's currently hot, proponents of the hot trend tend to disregard any technique which could decrease the "purity" of their pet paradigm.
N-tier architectures constituate a problem of their own, I think: With the great focus on middleware, a lot of redundant coding seems to be done: Constraints are handled in the RDBMS, in the n layers of middleware and perhaps also in the client application. Transactions are dealt with in several layers, etc. The blame for this should not be put on the middleware-fans exclusively: RDBMSes tend to lack _usable_ error reporting; therefore, the middleware layers cannot solely rely on the RDBMS to do all the constraint handling if sensible error handling is to be performed (including sensible error reporting).
I think that the impedance mismatch would be less of a problem, if
The result of 1 and 2 could be less middleware "obesity" problems and more centralized constraint handling. Points 3 and 4 are actually wishes for less tendentious religiosity in the OO World: OO is a (sometimes) practical way to organize code, not an ever good, all-encompassing computing ideology.
While facing the risk of being seen as a make-love-not-war tech hippie, I suggest that the term "impedance mismatch" should be terminated and replaced with something less pessimistic, such as "practical issues in combination of forces".
-- Greetings from Troels Arvin, Copenhagen, DenmarkReceived on Sat Oct 02 2004 - 08:18:06 CDT
![]() |
![]() |