ORM stands for Object-Relational mapping. The objects in a Java class which is mapped in to the tables of a relational database using the metadata that describes the mapping between the objects and the database. It works by transforming the data from one representation to another.
Hibernate is a open source object-relational mapping and query service. In hibernate we can write HQL instead of SQL which save developers to spend more time on writing the native SQL. Hibernate has more powerful association, inheritance, polymorphism, composition, and collections. It is a beautiful approach for persisting into database using the java objects. Hibernate also allows you to express queries using java-based criteria .
Advantages of Hibernate
Hibernate is a open source object-relational mapping and query service. In hibernate we can write HQL instead of SQL which save developers to spend more time on writing the native SQL. Hibernate has more powerful association, inheritance, polymorphism, composition, and collections. It is a beautiful approach for persisting into database using the java objects. Hibernate also allows you to express queries using java-based criteria .
Advantages of Hibernate
- Hibernate is portable i mean database independent, Vendor independence.
- Standard ORM also supports JPA
- Mapping of Domain object to relational database.
- Hibernate is better then plain JDBC.
- JPA provider in JPA based applications.
Limitations of Hibernate
- Slower in executing the queries than queries are used directly.
- Only query language support for composite keys.
- No shared references to value types.