Performance Analysis of .NET Based Object–Relational Mapping Frameworks

Part of the Communications in Computer and Information Science book series (CCIS, volume 424)

Abstract

Object-relational mapping is a technology that connects relationships with object-oriented entities, which aims to eliminate duplicate layers together with costs of maintenance and any errors arising from their existence. A lot of tools and technologies were designed in order to support and implement idea of object-relational mapping. In this paper we present the performance comparison of two most common object-relational mapping interfaces for .NET framework: Entity Framework and NHibernate. In the .NET developers community, there is a lot of discussion today about the similarities and differences of the both technologies. To address this issue, we compared the features and performance of both tools. We analysed the performance of Entity Framework and NHibernate for two different databases (MS SQL Server and PostgreSQL), different query languages (lambda expressions and LINQ for Entity Framework and HQL and Critera API for NHibernate) and compared the results with the standard SqlClient queries. The results show that there is no significant difference between these both tools and we proved that common opinion that NHibernate performs better than Entity Framework is incorrect.

Keywords

Object-relational mapping ORM .NET framework Entity Framework NHibernate MS SQL Server PostgreSQL performance analysis 

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    NHibernate 3.3.1 (2013), http://nhforge.org/
  2. 2.
    Barnes, J.: Object-Relational Mapping as a Persistence Mechanism for Object-Oriented Applications. Master’s thesis, Macalester College, Saint Paul, Minnesota, USA (2007)Google Scholar
  3. 3.
    Bhatti, S., Abro, Z., Rufabro, F.: Performance evaluation of java based object relational mapping tool. Mehran University Research Journal of Engineering and Technology 32(2), 159–166 (2013)Google Scholar
  4. 4.
    Cvetković, S., Janković, D.: A comparative study of the features and performance of ORM tools in a .NET environment. In: Dearle, A., Zicari, R.V. (eds.) ICOODB 2010. LNCS, vol. 6348, pp. 147–158. Springer, Heidelberg (2010)CrossRefGoogle Scholar
  5. 5.
    Doomen, D.: Entity framework 5/6 vs nhibernate 3 – the state of affairs (2013), http://www.dennisdoomen.net/2013/03/entity-framework-56-vs-nhibernate-3.html (accessed December 2013)
  6. 6.
    Entity Framework team: Entity framework 5.0 (2013), http://entityframework.codeplex.com/
  7. 7.
    Fowler, M.: Ormhate (2013), http://martinfowler.com/bliki/OrmHate.html (accessed December 2013)
  8. 8.
    Marguerie, F.: Choosing an object-relational mapping tool, http://madgeek.com/Articles/ORMapping/EN/mapping.htm (accessed December 2013)
  9. 9.
    Microsoft Corporation: Microsoft SQL server 2012 (2013), http://www.microsoft.com/en-us/sqlserver/
  10. 10.
    Płuciennik-Psota, E.: Object relational interfaces survey. Studia Informatica 33(2A), 299–310 (2012)Google Scholar
  11. 11.
    The PostgreSQL Global Development Group: PostgreSQL 9.3.2 (2013), http://www.postgresql.org

Copyright information

© Springer International Publishing Switzerland 2014

Authors and Affiliations

  1. 1.Institute of InformaticsSilesian University of TechnologyGliwicePoland

Personalised recommendations