English 中文(简体)
iBATIS - Hibernate
  • 时间:2024-12-22

iBATIS - Hibernate


Previous Page Next Page  

There are major differences between iBATIS and Hibernate. Both the solutions work well, given their specific domain. iBATIS is suggested in case −

    You want to create your own SQL s and you are wilpng to maintain them.

    Your environment is driven by relational data model.

    You have to work on existing and complex schemas.

Use Hibernate if the environment is driven by object model and needs to generate SQL automatically.

Difference between iBATIS and Hibernate

Both Hibernate and iBATIS are open source Object Relational Mapping (ORM) tools available in the industry. Use of each of these tools depends on the context you are using them.

The following table highpghts the differences between iBATIS and Hibernate −

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 pttle difficult in Hibernate.

Both Hibernate and iBATIS receive good support from the SPRING framework, so it should not be a problem to choose one of them.

Advertisements