Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Ireland
1. 2010 CRC PhD Student Conference
Understanding Object-Relational Impedance Mismatch: A
Framework Based Approach
Chris Ireland
cji26@student.open.ac.uk
Supervisors David Bowers
Mike Newton
Kevin Waugh
Department/Institute Computing
Status 5th Year, Part-time
Probation viva Completed
Starting date 1 October 2005
Research Question
Object-relational impedance mismatch is the label used to classify the problems faced by the developer
of an object-oriented application that must use a relational database for storage. What is object-
relational impedance mismatch, how do we know if a particular strategy is the most appropriate way to
address the problems it presents and what can be done to improve the situation?
Background
In [1] I describe a framework and classification (Figure 1) that provide new insights into the object-
relational mapping (ORM) strategies used to address problems of an object-relational impedance
mismatch.
Concept
Conceptual
Object Orientation Mismatch Relational
(Reconciliation)
Language
Representation
OOPL (e.g. Java) Mismatch SQL
(Pattern)
Schema
Emphasis
Application Mismatch DB Schema
(Mapping)
Behaviour
Instance
Insta
e
ur
nce
ct
Mis
(Tran match
ru
St
sform
ation
)
Object State Row
Figure 1 - My Conceptual Framework and Classification of Impedance Mismatch
What is not clear are how one uses my framework to understand an ORM strategy, where does one
start, how does one proceed, what can one expect to discover and how do we understand changes that
may improve the situation? Figure 2 provides an overview of one process for using my framework. I
Page 37 of 125
2. 2010 CRC PhD Student Conference
describe this process in more detail in [5]. The process and framework have been validated by
comparing and contrasting the outcomes with those possible using the classification of Fussell [6].
Figure 2 - My Framework Based Approach
The framework may also be used to understand (possible) solutions to problems of an object-relational
impedance mismatch. At the last CRC PhD Student Conference I set an objective to understand the
consequences of changes introduced in Object-Relational SQL (OR-SQL) [7] using my framework.
OR-SQL is a language level change and may be one solution to problems of an object-relational
impedance mismatch. This work is complete and the results have been published in [8]. I found that
OR-SQL does not improve the situation and that the term relational database is now overloaded.
So what…
ORM strategies are not new. There is a body of literature (e.g. Keller [2], Ambler [3], Hohenstein [4])
that provide a description and analysis of each ORM strategy. This analysis is focused on the practical
consequences of combining object and relational artefacts rather than understanding the underlying
issues with an ORM strategy. Achieving an understanding of the underlying issues is the objective of
my framework and process. Analysis using my framework asks that one thinks about an ORM strategy
in a new way. In so doing it helps to provide new insights into an ORM strategy, highlight new issues,
understand cause and effect, and suggest improvements to an ORM strategy.
In [1] (this was awarded a best paper at the conference), [5] and [8] I have shown that the framework
and process do provide new insights. These insights provide an opportunity to improve an ORM
strategy and the context in which that ORM strategy operates, and to understand how best to make use
Page 38 of 125
3. 2010 CRC PhD Student Conference
of new features in OR-SQL. Such information is useful to standards bodies, tools vendors and those
who define an ORM strategy using SQL or OR-SQL. Thinking about the consequences of an ORM
strategy provides information necessary to choose between alternatives. This information is invaluable
to those who implement an ORM strategy.
The Problem
The framework provides guidance on the use of my framework but there is still a need for clear
guidance on how to compare object and relational representations. What is the basis for a comparison
and how might we go about making a comparison?
Current Research Activities
I am exploring how we might explore the different kinds of impedance mismatch described in Figure
1. To that end I am developing a technique based on equivalence. Problems of an impedance mismatch
exist because object and relational representations are different, but how are they equivalent?
An object and a relational design reflect aspects of a universe of discourse ([9], p2-1). That universe of
discourse provides a point of reference common to both object and relational representations. Whilst
each design uses a different conceptual framework, language and structure(s) to describe that universe
they are representations of the same universe. So, whilst object and relational representations are
different, if we are not to lose information in a round-trip between an object-oriented application and a
relational database they must be equivalent descriptions of that universe. The problem is how do we
describe that universe without favouring one conceptual framework over another?
I introduce a third silo into the framework: the reference silo. The reference silo is currently theoretical
and artefacts within it an ideal. In this silo there is a reference concept level, a reference language level,
a reference schema level and a reference instance level. Each level provides artefacts for the description
of some aspect of a universe of discourse. This description does not need to be perfect, but as a
minimum it must be a superset of those semantics and structures that may be described using object
and relational artefacts.
Identity Entity Identity based
independent of on value of a
attributes tuple
Identity is
implicit Identity is
Object Identify a Relational explicit
Schema particular Schema
occurrence
Identity of an
object Identity of a
row
Figure 3 - Exploring Identity Between Object and Relational Representations of an Entity
Page 39 of 125
4. 2010 CRC PhD Student Conference
Employing the reference silo I can then explore those semantics and structures of a reference
representation that are captured in an object and a relational representation. Each representation is
shown as a set in a Venn diagram (e.g. Figure 3) where, depending on the level of the framework, a
set may contain conceptual building blocks, language structures, design representations or data formats.
In Figure 3 I provide one example that shows that there is little in common between object and
relational representations of identity at the language level. My argument is that only those semantics
and structures that are equivalent i.e. they are captured in both representations, can form part of a no-
loss transformation between object and relational representations. It follows that current pattern
strategies to map identity between object and relational representations (e.g. Blaha [10], p420, Keller
[2], p21 and Fowler, in Ambler [11], p285), are at best misguided.
The work on equivalence will enhance my process (Figure 2) and provide a more robust approach to
exploring individual ORIM problems and ORM strategies. I expect that this will also open up new
avenues for research into the nature and development of the reference silo.
Remaining Work
I have provided a convincing and published body of evidence to support my claims for the framework.
The work on equivalence provides the final piece of work for my thesis and will open up new avenues
for future research. The work on equivalence necessary for my Thesis will be complete by the summer
of 2010. If time permits I would like to publish the work on equivalence before submitting my Thesis
in the summer of 2011.
References
1. Ireland, C., Bowers, D., Newton, M., Waugh, K.: A Classification of Object-Relational Impedance
Mismatch. In: Chen, Q., Cuzzocrea, A., Hara, T., Hunt, E., Popescu, M. (eds.): The First International
Conference on Advances in Databases, Knowledge and Data Applications, Vol. 1. IEEE Computer Society,
Cancun, Mexico (2009) p36-43
2. Keller, W.: Mapping Objects to Tables: A Pattern Language. In: Bushman, F., Riehle, D. (eds.): European
Conference on Pattern Languages of Programming Conference (EuroPLoP), Irsee, Germany (1997)
3. Ambler, S.: Mapping Objects to Relational Databases: O/R Mapping In Detail. (2006)
4. Hohenstein, U.: Bridging the Gap between C++ and Relational Databases. In: Cointe, P. (ed.): European
Conference on Object-Oriented Programming, Vol. Lecture Noted on Computer Science 1098. Springer-
Verlag, Berlin (1996) 398-420
5. Ireland, C., Bowers, D., Newton, M., Waugh, K.: Understanding Object-Relational Mapping: A Framework
Based Approach. International Journal On Advances in Software 2 (2009)
6. Fussell, M.L.: Foundations of Object Relational Mapping. Vol. 2007. ChiMu Corporation (1997)
7. Eisenberg, A., Melton, J.: SQL: 1999, formerly known as SQL3. SIGMOD Record 28 (1999) 119-126
8. Ireland, C., Bowers, D., Newton, M., Waugh, K.: Exploring the use of Mixed Abstractions in SQL:1999 - A
Framework Based Approach. In: Chen, Q., Cuzzocrea, A., Hara, T., Hunt, E., Popescu, M. (eds.): The
Second International Conference on Advances in Databases, Knowledge and Data Applications, Vol. 1.
IEEE Computer Society, Les Menuires, France (2010) TBA
9. Griethuysen, J.J.v. (ed.): Concepts and Terminology for the Conceptual Schema and the Information Base.
ISO, New York (1982)
10. Blaha, M.R., Premerlani, W.J., Rumbaugh, J.E.: Relational database design using an object-oriented
methodology. Communications of the ACM 31 (1988) 414-427
11. Ambler, S.W.: Agile Database Techniques - Effective Strategies for the Agile Software Developer. Wiley
(2003)
Page 40 of 125