ORM Tools in Java
ORM stands for Object Relation Mapping. It is a middleware application or tool that sits between the web application and database. It wraps the implementation specific details of storage drivers in an API.
What is ORM?
ORM is a technique for converting data between Java objects and relational databases (table). In simple words, we can say that the ORM implements responsibility of mapping the object to relational model and vice-versa. the ORM tool does mapping in such a way that model class becomes a table in the database and each instance becomes a row of the table.
Advantages of ORM Tool
There are many ORM tools available but the following ORM tools are the most commonly used.
Hibernate is a Java persistence framework that simplifies the development of Java application to interact with the database. It is an open source, widely used, lightweight, ORM tool. Hibernate implements the specifications of JPA (Java Persistence API) for data persistence.
Advantages of Hibernate
TopLink is an ORM tool developed by Oracle especially for Java developers. It is a persistence framework that is a part of Oracle's OracleAS, WebLogic, OC4J servers. It provides development tools and run-time functionalities that ease the development process and increases the functionality. Persistent object data is stored in relational databases that helps build high-performance applications. Storing data in either XML (Extensible Markup Language) or relational databases is made possible by transforming it from object-oriented data.
Advantages of TopLink
Apache OpenJPA is a Java persistence project at The Apache Software Foundation that can be used as a stand-alone POJO persistence layer or integrated into any Java EE compliant container and many other lightweight frameworks, such as Tomcat and Spring.
Advantages of OpenJPA
MyBatis was formerly known as iBatis. It is also an open source persistence framework that simplifies the implementation of database. Basically, it performs the following four things:
It is different from other ORM tools. The main difference between MyBatis and other ORM tool is that MyBatis emphasis the use of SQL while other ORM tools uses custom query language (HQL).
Advantages of MyBatis
EclipseLink is the open source Eclipse Persistence Services tool introduced by Eclipse Foundation. It is an extensible framework that allows Java developers to interact with various data services such as databases, web services, Object XML mapping, and enterprise information systems. It supports the following four persistence standards:
Advantages of EclipseLink