Energy Efficiency of ORM Approaches: an Empirical Evaluation

G. Procaccianti, P. Lago, W. Diesveld

Research output: Chapter in Book/Report/Conference proceedingConference contribution

Abstract

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.
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
PublisherACM
ISBN (Electronic)978-1-4503-4427-2
DOIs
StatePublished - 2016
EventACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM) -
Duration: 1 Jan 20161 Jan 2016

Conference

ConferenceACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM)
Period1/01/161/01/16

Fingerprint

Energy efficiency
Energy utilization
Maintainability
Application programs
Experiments
Industry

Cite this

Procaccianti, G., Lago, P., & Diesveld, W. (2016). Energy Efficiency of ORM Approaches: an Empirical Evaluation. In Proceedings of the 10th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM 2016, Ciudad Real, Spain, September 8-9, 2016 ACM. DOI: 10.1145/2961111.2962586
Procaccianti, G. ; Lago, P. ; Diesveld, W./ Energy Efficiency of ORM Approaches: an Empirical Evaluation. Proceedings of the 10th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM 2016, Ciudad Real, Spain, September 8-9, 2016. ACM, 2016.
@inproceedings{338ca37da09f40feb9384316aa74fb42,
title = "Energy Efficiency of ORM Approaches: an Empirical Evaluation",
abstract = "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.",
author = "G. Procaccianti and P. Lago and W. Diesveld",
year = "2016",
doi = "10.1145/2961111.2962586",
language = "English",
booktitle = "Proceedings of the 10th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM 2016, Ciudad Real, Spain, September 8-9, 2016",
publisher = "ACM",

}

Procaccianti, G, Lago, P & Diesveld, W 2016, Energy Efficiency of ORM Approaches: an Empirical Evaluation. in Proceedings of the 10th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM 2016, Ciudad Real, Spain, September 8-9, 2016. ACM, ACM/IEEE International Symposium on Empirical Software Engineering and Measurement (ESEM), 1/01/16. DOI: 10.1145/2961111.2962586

Energy Efficiency of ORM Approaches: an Empirical Evaluation. / Procaccianti, G.; Lago, P.; Diesveld, W.

Proceedings of the 10th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM 2016, Ciudad Real, Spain, September 8-9, 2016. ACM, 2016.

Research output: Chapter in Book/Report/Conference proceedingConference contribution

TY - GEN

T1 - Energy Efficiency of ORM Approaches: an Empirical Evaluation

AU - Procaccianti,G.

AU - Lago,P.

AU - Diesveld,W.

PY - 2016

Y1 - 2016

N2 - 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.

AB - 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.

U2 - 10.1145/2961111.2962586

DO - 10.1145/2961111.2962586

M3 - Conference contribution

BT - Proceedings of the 10th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM 2016, Ciudad Real, Spain, September 8-9, 2016

PB - ACM

ER -

Procaccianti G, Lago P, Diesveld W. Energy Efficiency of ORM Approaches: an Empirical Evaluation. In Proceedings of the 10th ACM/IEEE International Symposium on Empirical Software Engineering and Measurement, ESEM 2016, Ciudad Real, Spain, September 8-9, 2016. ACM. 2016. Available from, DOI: 10.1145/2961111.2962586