– Spring supports both iBatis and Hibernate

Difference between iBATIS and Hibernate

  • Both Hibernate and iBATIS are open source Object Relational Mapping (ORM) tools
  • Usage depends on the use-case and context.



  • Hibernate works better if your view is more object-centric.
  • If however you view is more database-centric then Ibatis is a much stronger choice.
  • If you’re in complete control of your schema and you don’t have an extremely high throughput requirement then Hibernate can work quite well. The object model makes for fairly convenient code but at a huge complexity cost.
  • If you’re dealing with a “legacy” database schema where you need to write fairly complicated SQL queries then chances are Ibatis will work better.
    If your application have to use PL/SQL stored procedures, it blends nicely with iBatis
  • HQL (Hibernate Query Language) is another language you’ll have to learn and even then you’ll probably find cases where you still need to write SQL. What’s more, chances are you will at some spend half a day figuring out the right combination of XML, properties, annotations, etc to get Hibernate to generate a performant SQL query.”

more differences:

iBATIS Hibernate
iBATIS is simpler. It comes in a much smaller package size. Hibernate generates SQL for you which means you don’t have to spend time on generating SQL.
iBATIS is flexible. It offers faster development time. Hibernate is highly scalable. It provides a much more advanced cache.
iBATIS uses SQL which could be database dependent. Hibernate uses HQL which is relatively independent of databases. It is easier to change db in Hibernate.
iBatis maps the ResultSet from JDBC API to your POJO Objets, so you don’t have to care about table structures. Hibernate maps your Java POJO objects to the Database tables.
It is quite easy to use stored procedure in iBATIS. Use of stored procedures is a little difficult in Hibernate.