Abstract

Most applications available nowadays are using an Object Relational Mapper (ORM) to access and save data. The additional layer that is being wrapped over the database induces a performance impact in detrimental of raw SQL queries; on the other side, the advantages of using ORMs by focusing on domain level through application development represent a premise for easier development and simpler code maintenance. In this context, this paper makes a performance comparison between three of the most used ORM technologies from the .NET family: Entity Framework Core 2.2, nHibernate 5.2.3 and Dapper 1.50.5. The main objective of the paper is to make a comparative analysis of the impact that a specific ORM has on application performance when realizing database requests. In order to perform the analysis, a specific testing architecture was designed to ensure the consistency of tests. Performance evaluation for time responses and memory usage for each technology was done using the same CRUD (Create Read Update Delete) operations on the database. The results obtained proved that the decision to use one of another is dependent of the most used type of operation. A comprehensive discussion based on results analysis is done in order to support a decision for choosing a specific ORM by the software engineers in the process of software design and development.

Highlights

  • ORM (Object Relational Mapper) is a pattern for accessing a relational database from an object-oriented language, with several implementation for almost every language

  • The additional layer that is being wrapped over the database induces a performance impact in detrimental of raw SQL queries; on the other side, the advantages of using ORMs by focusing on domain level through application development represent a premise for easier development and simpler code maintenance

  • From several ORMs that exists nowadays, this paper focuses on the three of the most used ORMs for .NET applications development: Entity Framework Core [4], nHibernate [5] and Dapper: EF Core that translates the Remove (EF Core) 2.2.3 with EF Core Proxies 2.2.3 and EF Core SqlServer 2.2.2 libraries alongside with Dapper 1.50.5 library and using Dapper.Bulk 1.4.2 for bulk operations and nHibernate 5.2.3, configured with FluentNHibernate 2.1.2

Read more

Summary

Introduction

ORM (Object Relational Mapper) is a pattern for accessing a relational database from an object-oriented language, with several implementation for almost every language. Some ORM features include custom-SQL extensions for query building. An ORM is a library that uses the object-oriented paradigm in a specific language to write a query that will return a set of data mapped into an object type that is needed [1]. The use of ORMs will have a negative impact on the application’s execution time because it is being wrapped over the relational database and, in comparison to raw SQL queries, which can be stored as procedures or functions in a database, it provides slower return time values for all types of requests. Depending on the ORM, this performance downsides are introduced either by internal way of entity-model design approach or, by using reflection [3]

Objectives
Methods
Results
Conclusion

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.