journal article·2024-03-25Open access

Performance Analysis and Improvement for CRUD Operations in Relational Databases from Java Programs Using JPA, Hibernate, Spring Data JPA

Alexandru Marius Bonteanu, Cătălin Tudose

Applied Sciences· Volume 14· Issue 7

Abstract

The role of databases is to allow for the persistence of data, no matter if they are of the SQL or NoSQL type. In SQL databases, data are structured in a set of tables in the relational database model, grouped in rows and columns. CRUD operations (create, read, update, and delete) are used to manage the information contained in relational databases. Several dialects of the SQL language exist, as well as frameworks for mapping Java classes (models) to a relational database. The question is what we should choose for our Java application, and why? A comparison of the most frequently used relational database management systems, mixed with the most frequently used frameworks should give us some guidance about when to use what. The evaluation is conducted based on the time taken for each CRUD operation to run, from thousands to hundreds of thousands of entries, using the possible combinations in the relational database system and the framework. Aiming to assess and improve the performance, the experiments included the possibility of warming-up the Java Virtual Machine before the execution of queries. Also, the research investigated the time spent using different methods of code to determine the critical regions (bottlenecks). Thus, the conclusions provide a comprehensive overview of the performances of Java applications accessing databases depending on the suite decisions considering the database type, the framework in use, and the type of operation, with clear comparisons between the alternatives, the key findings of the advantages and drawbacks of each of them, and supporting architects and developers in their technological decisions and improving the speed of their programs.
Source: crossref · Quality: baseline

Research context

OpenAlex topics: Advanced Database Systems and Queries · Data Management and Algorithms · Data Mining Algorithms and Applications

SciVX discovery tags are terminology-based. OpenAlex topics are source-provided classifications.

Affiliations

Faculty of Automatic Control and Computers, National University of Science and Technology Politehnica Bucharest, 060042 Bucharest, Romania

Luxoft Romania, 060042 Bucharest, Romania

References (45)

Show source-provided references
1. Chamberlin, D. (2018). SQL++ For SQL Users: A Tutorial, Couchbase, Inc.10.1007/978-1-4614-8265-9_1091 ↗
2. Arnold, K., Gosling, J., and Holmes, D. (2005). The Java Programming Language, Addison-Wesley Professional. [4th ed.].
3. Sierra, K., Bates, B., and Gee, T. (2022). Head First Java: A Brain-Friendly Guide, O’Reilly Media. [3rd ed.].
4. Keith, M., and Schnicariol, M. (2009). Pro JPA 2, Apress.10.1007/978-1-4302-1957-6 ↗
5. Tudose, C., and Odubăşteanu, C. (2021, January 26–28). Object-relational Mapping Using JPA, Hibernate, and Spring Data JPA. Proceedings of the 23rd International Conference on Control Systems and Computer Science, Bucharest, Romania.10.1109/CSCS52396.2021.00076 ↗
6. Bonteanu, A.-M., and Tudose, C. (2022, January 8–10). Multi-platform Performance Analysis for CRUD Operations in Relational Databases from Java Programs Using Hibernate. Proceedings of the Big Data Intelligence and Computing: International Conference, DataCom 2022, Denarau Island, Fiji.10.1007/978-981-99-2233-8_20 ↗
7. Bonteanu, A.M., Tudose, C., and Anghel, A.M. (2023, January 24–26). Performance Analysis for CRUD Operations in Relational Databases from Java Programs Using Hibernate. Proceedings of the 24th International Conference on Control Systems and Computer Science (CSCS), Bucharest, Romania.10.1109/CSCS59211.2023.00109 ↗
8. Bonteanu, A.-M., Tudose, C., and Anghel, A.M. (2023, January 23–25). Multi-Platform Performance Analysis for CRUD Operations in Relational Databases from Java Programs using Spring Data JPA. Proceedings of the 13th International Symposium on Advanced Topics in Electrical Engineering (ATEE), Bucharest, Romania.10.1109/ATEE58038.2023.10108212 ↗
9. Grippa, V., and Kuzmichev, S. (2021). Learning MySQL: Get a Handle on Your Data, O’Reilly Media. [2nd ed.].
10. Reid, M. (2013). InnoDB Quick Reference Guide, Packt Publishing.
11. Kieseberg, P., Schrittwieser, S., Frühwirt, P., and Weippl, E. (2019, January 25–26). Analysis of the Internals of MySQL/InnoDB B plus Tree Index Navigation from a Forensic Perspective. Proceedings of the 2019 International Conference on Software Security and Assurance (ICSSA 2019), St. Pölten, Austria.10.1109/ICSSA48308.2019.00013 ↗
12. Using Internal MySQL/InnoDB B-Tree Index Navigation for Data Hiding10.1007/978-3-319-24123-4_11 ↗
13. O’Hearn, S. (2017). OCA Oracle Database SQL Exam Guide (Exam 1Z0-071) (Oracle Press), McGraw Hill.
14. Ferrari, L., and Pirozzi, E. (2023). Learn PostgreSQL: Use, Manage, and Build Secure and Scalable Databases with PostgreSQL 16, Packt Publishing. [2nd ed.].
15. Ciolli, G., Mejías, B., Angelakos, J., Kumar, V., and Riggs, S. (2023). PostgreSQL 16 Administration Cookbook: Solve Real-World Database Administration Challenges with 180+ Practical Recipes and Best Practices, Packt Publishing.
16. Kirshteyn, M. (2024). Mastering SQL Server Database Administration. A Comprehensive Guide to Perfection and Productivity, Independently Published.
17. Aspin, A. (2022). Querying SQL Server: Run T-SQL Operations, Data Extraction, Data Manipulation, and Custom Queries to Deliver Simplified Analytics, BPB Publications.
18. Boicea, A., Crivat, A., Radulescu, F., and Popa, G. (2010, January 20–23). Performance evaluation and tuning in an Oracle DBMS. Proceedings of the Annals of DAAAM for 2010 & 21st International DAAAM Symposium, EU, Vienna, Austria.
19. Boicea, A., Radulescu, F., and Agapin, L. (2012, January 19–21). MongoDB vs. Oracle–database comparison. Proceedings of the 2012 Third International Conference on Emerging Intelligent Data and Web Technologies, Bucharest, Romania.10.1109/EIDWT.2012.32 ↗
20. Boicea, A., Radulescu, F., Bucur, I., and Ungureanu, D. (2009, January 25–28). Using Optimizer Hints in an Oracle Database. Proceedings of the Annals of DAAAM for 2009 & 21st International DAAAM Symposium, Vienna, Austria.
21. Boicea, A., Radulescu, F., and Ungureanu, D. (2008, January 5–7). Optimizing the Execution Plan in an Oracle Database. Proceedings of the BICS 2008: Proceedings of the 1st International Conference on Bio-Inspired Computational Methods Used for Solving Difficult Problems-Development of Intelligent and Complex Systems, Târgu Mureș, Romania.
22. Survey on Performance Optimization for Database Systems10.1007/s11432-021-3578-6 ↗
23. A Comprehensive Study and Review of Tuning the Performance on Database Scalability in Big Data Analytics10.3233/JIFS-223295 ↗
24. Carvalho, I., Sá, F., and Bernardino, J. (2023). Performance Evaluation of NoSQL Document Databases: Couchbase, CouchDB, and MongoDB. Algorithms, 16.10.3390/a16020078 ↗
25. Cooper, B., Silberstein, A., Tam, E., Ramakrishnan, R., and Sears, R. (2010, January 10–11). Benchmarking Cloud Serving Systems with YCSB. Proceedings of the 1st ACM Symposium on Cloud Computing, Indianapolis, IN, USA.10.1145/1807128.1807152 ↗
26. Performance Evaluation of XML Dynamic Labeling Schemes on Relational Database10.14716/ijtech.v13i5.5871 ↗
27. Priority-Driven Differentiated Performance for NoSQL Database-as-a-Service10.1109/TCC.2023.3292031 ↗
28. Database Task Processing Optimization Based on Performance Evaluation and Machine Learning Algorithm10.1007/s00500-023-08111-1 ↗
29. Yousaf, H. (2012). Performance Evaluation of Java Object-Relational Mapping Tools. [Master’s Thesis, University of Georgia].
30. Hossain, I., Sazal, M., and Das Santa, T. (2019). Oracle, MySQL, PostgreSQL, SQLite, SQL Server: Performance-Based Competitive Analysis. [Bachelor’s Thesis, Computer Science and Engineering, Daffodil International University].
31. Performance Comparison of CRUD methods using NET Object Relational Mappers: A Case Study
32. Cvetkovic, S., and Jankovic, D. (2010, January 28–30). A Comparative Study of the Features and Performance of ORM Tools in a .NET Environment. Proceedings of the 3rd International Conference on Object-Oriented Databases, Frankfurt, Germany.
33. Colley, D., Stanier, C., and Asaduzzaman, M. (2018, January 16–17). The Impact of Object-Relational Mapping Frameworks on Relational Query Performance. Proceedings of the 2018 International Conference on Computing, Electronics & Communications Engineering (ICCECE), Southend, UK.10.1109/iCCECOME.2018.8659222 ↗
34. Babu, C., and Gunasingh, G. (2016, January 21–24). DESH: Database Evaluation System with Hibernate ORM Framework. Proceedings of the 2016 International Conference on Advances in Computing, Communications and Informatics (ICACCI), Jaipur, India.10.1109/ICACCI.2016.7732441 ↗
35. Hibernate and Spring—An Analysis of Maintainability against Performance
36. Vaja, D.D., and Rahevar, M. (2016, January 19–21). Improve performance of ORM caching using In-Memory caching. Proceedings of the 2016 International Conference on Computing, Analytics and Security Trends (CAST), Pune, India.10.1109/CAST.2016.7914950 ↗
37. Atzeni, P., and De Antonellis, V. (1993). Relational Database Theory, Benjamin-Cummings Publishing Co., Inc.
38. Tudose, C. (2023). Java Persistence with Spring Data and Hibernate, Manning.
39. Tudose, C. (2020). JUnit in Action, Manning.
40. What’s Wrong with My Benchmark Results? Studying Bad Practices in JMH Benchmarks10.1109/TSE.2019.2925345 ↗
41. YourKit (2023, December 20). (2003–2023). YourKit Java Profiler. Available online: https://www.yourkit.com/java/profiler/features/.
42. Mihalcea, V. (2019). High-Performance Java Persistence, Self-Published.
43. Erder, M., Pureur, P., and Woods, E. (2021). Continuous Architecture in Practice: Software Architecture in the Age of Agility and DevOps, Addison-Wesley Professional.
44. Ciceri, C., Farley, D., Ford, N., Harmel-Law, A., Keeling, M., Lilienthal, C., Rosa, J., von Zitzewitz, A., Weiss, R., and Woods, E. (2022). Software Architecture Metrics, O’Reilly Media, Inc.
45. Software development methodologies: A comparative analysis