Investigating the Effects of Object-Relational Impedance Mismatch on the Efficiency of Object-Relational Mapping Frameworks

Investigating the Effects of Object-Relational Impedance Mismatch on the Efficiency of Object-Relational Mapping Frameworks

Derek Colley, Clare Stanier, Md Asaduzzaman
Copyright: © 2020 |Pages: 23
DOI: 10.4018/JDM.2020100101
(Individual Articles)
No Current Special Offers


The object-relational impedance mismatch (ORIM) problem characterises differences between the object-oriented and relational approaches to data access. Queries generated by object-relational mapping (ORM) frameworks are designed to overcome ORIM difficulties and can cause performance concerns in environments which use object-oriented paradigms. The aim of this paper is twofold, first presenting a survey of database practitioners on the effectiveness of ORM tools followed by an experimental investigation into the extent of operational concerns through the comparison of ORM-generated query performance and SQL query performance with a benchmark data set. The results show there are perceived difficulties in tuning ORM tools and distrust around their effectiveness. Through experimental testing, these views are validated by demonstrating that ORMs exhibit performance issues to the detriment of the query and the overall scalability of the ORM-led approach. Future work on establishing a system to support the query optimiser when parsing and preparing ORM-generated queries is outlined.
Article Preview


Object-relational impedance mismatch (ORIM) occurs when object-oriented application development – a hierarchical paradigm - meets the relational database layer, a set-based paradigm. ORIM is categorised into several layers of granularity, from concept to language (Chen et al., 2014; Ireland et al. 2009). In implementation terms, ORIM means overcoming the mismatch between invoking a method within an application to generating the Structured Query Language (SQL) that is required by the method. Using inline SQL can meet this need, but this method is intolerant of schema changes and can introduce security flaws, such as injection. Using a stored procedure layer as an alternative can help mimic the object-oriented model in the database, but comes at the cost of moving the application logic into the data layer, tightening the coupling between these two layers, potentially moving the logic out of source control and necessitating SQL skills to make changes in the future. The need to address relations as objects in the application-database interface instead bred a third solution, a class of tools known as object-relational mapping (ORM) frameworks, designed to bridge the gap between object-oriented method calls and the generation of Structured Query Language (SQL) queries. ORM frameworks differ in specifics, but typically store an internal data model and use rule bases and heuristics to generate SQL from this data model in response to application requests. The resultant SQL is presented to the relational database management system (RDBMS).

Relational databases are data stores that operate according to the long-established principles of relational algebra (Date, 1990; Astrahan et al., 1976; Held, Stonebraker & Wong, 1975; Codd, 1974; Stoll, 1963). In contrast to document-style databases, storing unstructured or semi-structured attribute-value pairs, relational database design is based on relations, or sets of tuples of related values, which are stored in tables, linked with keys and queried with SQL. It is claimed that 4 of the top 5 most popular database tools in recent use are based on the relational model (Solid IT, 2018).

This paper investigates whether ORM frameworks are well-suited to producing SQL queries, given that ORM tools are, themselves, object-oriented constructs; more specifically, whether the mismatch postulated by ORIM can be observed in the methods and outputs of ORM tools as measured by relative performance; in essence, are ORM tools producing efficient SQL?

We investigate this aim in three ways: firstly, through a literature review of ORIM and associated relevant topics; secondly, through the administration of a survey of practising database professionals aimed at gathering expert opinions on the perceived effectiveness of ORM tooling, using thematic analysis to construct appropriate narratives; and thirdly by investigating, through empirical experimentation and using industrial software, the operation of ORM-generated performance impacts on a relational database using a benchmark data set, extending our prior research (Colley, Stanier & Asaduzzaman, 2018) in this area. By combining all three approaches, we validate whether the opinions of our survey participants are borne out by the findings of the ORM testing; whether the results of the ORM testing concord with the findings of other researchers; and to establish whether ORIM is a solved problem through the use of ORMs, or whether ORIM at the application-database interface remains a current and relevant issue, to be addressed by future research.

The remainder of this paper is structured as follows. The Literature Review section defines ORIM in more detail, summarises prior research into the issue, and describes how the issue can be manifested in relational database systems. The Problem Investigation section describes the investigation; split into two sections, the Domain Expert Views sub-section explains the methodology and process of gathering domain-expert views and presents the results; and the Empirical Investigation sub-section describes the experimental investigation into the impacts of ORM-generated queries and the results of this work. The Conclusion section draws together these results in the context of existing research, and Future Work discusses ideas for further research in mitigating ORM-generated query performance issues and future strategies for addressing ORIM in the data layer.

Complete Article List

Search this Journal:
Volume 34: 3 Issues (2023)
Volume 33: 5 Issues (2022): 4 Released, 1 Forthcoming
Volume 32: 4 Issues (2021)
Volume 31: 4 Issues (2020)
Volume 30: 4 Issues (2019)
Volume 29: 4 Issues (2018)
Volume 28: 4 Issues (2017)
Volume 27: 4 Issues (2016)
Volume 26: 4 Issues (2015)
Volume 25: 4 Issues (2014)
Volume 24: 4 Issues (2013)
Volume 23: 4 Issues (2012)
Volume 22: 4 Issues (2011)
Volume 21: 4 Issues (2010)
Volume 20: 4 Issues (2009)
Volume 19: 4 Issues (2008)
Volume 18: 4 Issues (2007)
Volume 17: 4 Issues (2006)
Volume 16: 4 Issues (2005)
Volume 15: 4 Issues (2004)
Volume 14: 4 Issues (2003)
Volume 13: 4 Issues (2002)
Volume 12: 4 Issues (2001)
Volume 11: 4 Issues (2000)
Volume 10: 4 Issues (1999)
Volume 9: 4 Issues (1998)
Volume 8: 4 Issues (1997)
Volume 7: 4 Issues (1996)
Volume 6: 4 Issues (1995)
Volume 5: 4 Issues (1994)
Volume 4: 4 Issues (1993)
Volume 3: 4 Issues (1992)
Volume 2: 4 Issues (1991)
Volume 1: 2 Issues (1990)
View Complete Journal Contents Listing