Title
An empirical study on the practice of maintaining object-relational mapping code in Java systems.
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.
Year
DOI
Venue
2016
10.1145/2901739.2901758
MSR
Keywords
Field
DocType
static code analyzers,ORM code verification,database access encapsulation,Java systems,open source systems,boilerplate code,database records,object-oriented languages,application logic,abstraction layer,object-relational mapping,software systems,Java systems,object-relational mapping code
Object-relational mapping,Data mining,Software analytics,Computer science,Online transaction processing,Boilerplate code,Software system,Abstraction layer,Web service,Java,Database
Conference
ISBN
Citations 
PageRank 
978-1-4503-4186-8
2
0.36
References 
Authors
34
7
Name
Order
Citations
PageRank
Tse-Hsun Chen123319.10
Weiyi Shang256638.03
Jinqiu Yang32006.73
Ahmed E. Hassan45959287.68
Michael W. Godfrey51744132.59
Mohamed N. Nasser61165.13
Parminder Flora741619.50