Energy Efficiency of ORM Approaches: an Empirical Evaluation

G. Procaccianti, P. Lago, W. Diesveld

Research output: Chapter in Book / Report / Conference proceedingConference contributionAcademicpeer-review

489 Downloads (Pure)


Context. Object-Relational Mapping (ORM) frameworks are widely used in business software applications to interact with database systems. Even if ORMs introduce several benefits when compared to a plain SQL approach, these techniques have known disadvantages.

Goal. In this paper, we present an empirical study that evaluates the energy efficiency of three different approaches to programmatically access SQL databases in PHP applications. The selected approaches are: plain SQL queries in the source code, and two specialized frameworks, Propel and TinyQueries.

Method. We performed an empirical experiment in a controlled environment. We selected three factors for our experimentation: the different ORM approaches, the type of query (Create, Read, Update, Delete) and the size of database tables. Our response variables were execution time and energy consumption.

Results. As expected, pure SQL yielded the best performance and energy efficiency in all test cases. Propel exhibited a much higher energy consumption and longer execution times. The TinyQueries tool performed slightly worse than SQL, but significantly better than Propel, offering a convenient trade--off between ORM benefits and energy efficiency.

Conclusions. Our experiment shows that ORM approaches have a significant impact on both energy consumption and performance. This helps developers and architects when considering the trade-off between their benefits (e.g. in terms of code maintainability and readability) and drawbacks.
Original languageEnglish
Title of host publicationProceedings of the 10th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM 2016, Ciudad Real, Spain, September 8-9, 2016
ISBN (Electronic)978-1-4503-4427-2
Publication statusPublished - 2016
EventACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM) -
Duration: 1 Jan 20161 Jan 2016


ConferenceACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM)


Dive into the research topics of 'Energy Efficiency of ORM Approaches: an Empirical Evaluation'. Together they form a unique fingerprint.

Cite this