A lot of people ask me when i give sessions on IBatis.Which is better ?IBatis or Hibernate? IBatis maps the Java Objects to the SQL Query’s results. Hibernate, maps Java Objects to DB tables (Object-Relational Mapping). Hibernate automatically generates all the SQL for you. In IBatis you can directly write queried in SQL, thus if you are a good SQL programmer, you would find learning Ibatis very easy. Thus Ibatis allows you to do anything what could be done through SQL. Thus you can virtually know what the affect of a query would be.
-
Hibernate is excellent for CRUD queries (Create, Read, Update, Delete) queries, and in applications where the object model is already ready.
-
IBatis is much simpler to learn compared to Hibernate .
-
On the other hand, Since you need to write all the queries by yourself, It has a much steeper development time and maintainability is comparatively difficult in Ibatis.
-
Also if there is a change in object – model, one needs to go through all the queries and correct them, which isn’t much of a problem in hibernate.
-
Hibernate does not support stored procedures. Ibatis does.
-
IBatis is faster in terms of query processing time
-
IBatis is better for batch inserts queries.
-
IBatis is simpler.
-
IBatis supports Dynamic Query which Hibernates doesn’t.
-
Hibernate is close to Object Oriented development. Ibatis is close to relational DB.


8 comments
iBatis Tutorial Part 2 - SQLMapConfig.xml Basics - Golmuri says:
August 17, 2008 at 3:24 pm (UTC 5.5)
[...] IBatis vs Hibernate ? Which one to choose? Share and Enjoy: [...]
Like or Dislike:
0
0
IBatis Tutorial - Sample Application Step 1 - Golmuri says:
August 17, 2008 at 3:36 pm (UTC 5.5)
[...] Read : IBatis vs Hibernate ? Which one to choose? IBatis Tutorial – Sample Application Step 2 Share and [...]
Like or Dislike:
1
0
Ibatis Tutorial - Sample Application Step 2 - Golmuri says:
August 17, 2008 at 3:39 pm (UTC 5.5)
[...] Also Read : IBatis vs Hibernate ? Which one to choose? [...]
Like or Dislike:
1
0
Ibatis Tutorial - Sample Application Step 3 - Golmuri says:
August 17, 2008 at 3:42 pm (UTC 5.5)
[...] Read : IBatis vs Hibernate ? Which one to choose? IBatis Tutorial – Sample Application Step 4 Introduction to IBatis Tutorial -Part 1 Share and [...]
Like or Dislike:
0
0
IBatis Tutorial - Sample Application Step 4 - Golmuri says:
August 17, 2008 at 3:46 pm (UTC 5.5)
[...] Read : IBatis vs Hibernate ? Which one to choose? IBatis Tutorial – Sample Application Step 5 Introduction to IBatis Tutorial -Part 1 Share and [...]
Like or Dislike:
0
0
Ibatis Tutorial - Sample Application Step 5 - Golmuri says:
August 17, 2008 at 3:49 pm (UTC 5.5)
[...] Read : IBatis vs Hibernate ? Which one to choose? IBatis Tutorial – Sample Application Step [...]
Like or Dislike:
1
0
Introduction to IBatis Tutorial -Part 1 - Golmuri says:
August 17, 2008 at 3:58 pm (UTC 5.5)
[...] Also Read : IBatis vs Hibernate ? Which one to choose? [...]
Like or Dislike:
1
0
Veera Sareddy says:
July 28, 2011 at 10:05 am (UTC 5.5)
Hi Sir,
Really good to see the differences. One tihng to clear..
Hibernate doesnt support stored procedures..? Then how to call procedures if Im using HIberante.
- Veera
Like or Dislike:
1
0