• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Topic : comparing Hibernate with iBatis

 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

How does iBatis compare with Hibernate ?

Thanks,
Pradip
 
author
Posts: 50
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Pradip,

Hibernate and iBATIS are quite different. With ORM frameworks such as Hibernate you specify how your domain model maps to the database schema: classes to tables, fields to columns, and relationships to either foreign keys or join tables. The ORM framework then generates and executes SQL statements as your application manipulates objects. An ORM will keep track of which objects you have modified and automatically update the database.

With iBATIS you specify how JavaBeans properties map to prepared statement placeholders and how a ResultSet maps to JavaBeans. You write the SQL and iBATIS takes care of the tedious job of executing them. You are responsible for tracking which objects have been modified and telling iBATIS to save them.

Roughly speaking, accessing the database with iBATIS requires more programming and maintenance effort. However, you can use iBATIS in situations where it does not make sense to use an ORM framework. See my post about when to use ORM and when to use iBATIS: https://coderanch.com/t/216017/ORM/java/iBatis-Hibernate-same-book

I hope this helps.

Chris
 
Pradeep bhatt
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks chris
reply
    Bookmark Topic Watch Topic
  • New Topic