Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

What does hql stand for in hibernate query language?


Asked by Remy Rodgers on Dec 05, 2021 Hibernate



HQL is an abbreviation for hibernate query language. Hibernate is a platform to connect the traditional databases to object-oriented language (specifically JAVA). It is a query language in hibernate is similar to SQL in traditional RDBMS except for the fact that we use an entity in HQL instead of tables.
In addition,
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, which in turns perform an action on a database.
Furthermore, 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. This is main difference between hql vs sql.
Consequently,
Chapter 15. HQL: The Hibernate Query Language. NHibernate is equipped with an extremely powerful query language that (quite intentionally) looks very much like SQL. But don't be fooled by the syntax; HQL is fully object-oriented, understanding notions like inheritance, polymorphism and association.
Also Know,
Although you can use SQL statements directly with Hibernate using Native SQL, but I would recommend to use HQL whenever possible to avoid database portability hassles, and to take advantage of Hibernate's SQL generation and caching strategies.