Hibernate

adplus-dvertising
HQL (Hibernate Query Language)
Previous Home Next

It is an object based version of SQL, it is used by hibernate to fetch data. Hibernate even provide a criterion API that provide a type safe and object oriented way to retrieve object from database.Using SQL has following shortcoming:

  • SQL is standarized but it is vendor -dependent features.
  • SQL is designed more specifically to work with relational database tables but not object.

To overcome these issues Hibernate introduce its own object oriented query language called Hibernate Query Language(HQL).

Advantages Of Using HQL
  • HQL queries are database independent.
  • HQL provide a support for ordering the result persist objects.
  • HQL is more object oriented which makes us write more easily than Sql.
  • HQL support pagination.
Previous Home Next