Abstract:
In modern software engineering, the mapping between the software layer and the persistent data layer is handled by the Object Relational Mapping (ORM) tools. These transform the operations on objects into DBMS CRUD queries. The problem of formulating the query associated with the operations in the most efficient way has been only partially solved by static code annotations. This implies that the programmer must guess the behaviour of the software once it is deployed in order to choose the best configuration. In this work, we make a step toward the dynamic configuration of the queries. The ORM that we propose aims at improving the overall system performance monitoring and adapting the behaviour of the query. The solution archives the result pruning the statement in two steps. In the first step the ORM choose columns to fetch taking into account the system load and usage frequencies. In the second step it exploits join elimination optimization, a feature implemented by some DBMS that removes unnecessary tables from a query, avoiding needless scans and joins operations. Then, the ORM proposed applies together eager and lazy strategies. It will load the expected data eagerly and laziness the data not expected but subsequently requested. The efficiency of the proposed solution is assessed through customized tests and through the Tsung test tool, comparing the ORM developed with a simple JDBC connection and the Hibernate ORM service.