An Empirical Study on the Practice of Maintaining Object-relational Mapping Code in Java Systems
Title | An Empirical Study on the Practice of Maintaining Object-relational Mapping Code in Java Systems |
Publication Type | Conference Paper |
Year of Publication | 2016 |
Authors | Chen, Tse-Hsun, Shang, Weiyi, Yang, Jinqiu, Hassan, Ahmed E., Godfrey, Michael W., Nasser, Mohamed, Flora, Parminder |
Conference Name | Proceedings of the 13th International Conference on Mining Software Repositories |
Date Published | May 2016 |
Publisher | ACM |
Conference Location | New York, NY, USA |
ISBN Number | 978-1-4503-4186-8 |
Keywords | composability, Metrics, object oriented security, pubcrawl, relational database security, Resiliency |
Abstract | Databases have become one of the most important components in modern software systems. For example, web services, cloud computing systems, and online transaction processing systems all rely heavily on databases. To abstract the complexity of accessing a database, developers make use of Object-Relational Mapping (ORM) frameworks. ORM frameworks provide an abstraction layer between the application logic and the underlying database. Such abstraction layer automatically maps objects in Object-Oriented Languages to database records, which significantly reduces the amount of boilerplate code that needs to be written. Despite the advantages of using ORM frameworks, we observe several difficulties in maintaining ORM code (i.e., code that makes use of ORM frameworks) when cooperating with our industrial partner. After conducting studies on other open source systems, we find that such difficulties are common in other Java systems. Our study finds that i) ORM cannot completely encapsulate database accesses in objects or abstract the underlying database technology, thus may cause ORM code changes more scattered; ii) ORM code changes are more frequent than regular code, but there is a lack of tools that help developers verify ORM code at compilation time; iii) we find that changes to ORM code are more commonly due to performance or security reasons; however, traditional static code analyzers need to be extended to capture the peculiarities of ORM code in order to detect such problems. Our study highlights the hidden maintenance costs of using ORM frameworks, and provides some initial insights about potential approaches to help maintain ORM code. Future studies should carefully examine ORM code, especially given the rising use of ORM in modern software systems. |
URL | https://dl.acm.org/doi/10.1145/2901739.2901758 |
DOI | 10.1145/2901739.2901758 |
Citation Key | chen_empirical_2016 |