Simple POJO Example – Employee

 



What is HQL?

HQL stand for Hibernate Query Language. Hibernate Query Language (HQL) is an object-oriented query language, similar to SQL, but instead of operating on tables and columns, HQL works with persistent objects and their properties. HQL queries are translated by Hibernate into conventional SQL queries.

The HQL query is created with syntax:




What is ORM?

ORM is an acronym for Object-Relational mapping. It is a programming strategy to map object with the data stored in the database. It simplifies data creation, data manipulation, and data access. Object-Relational Mapping (ORM) is a technique that lets you query and manipulate data from a database using


What is hibernate?

Hibernate is an open-source and lightweight ORM tool that is used to store, manipulate, and retrieve data from the database.


Hibernate Example Configuration File — hibernate.cfg.xml

The configuration file contains information about the database and mapping file. Conventionally, its name should be hibernate.cfg.xml.
create an XML file named hibernate.cfg.xml under the resources folder