This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Object Relational Mapping and the fly likes Hibernate Native SQL versus iBATIS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate Native SQL versus iBATIS" Watch "Hibernate Native SQL versus iBATIS" New topic
Author

Hibernate Native SQL versus iBATIS

Sam Gehouse
Ranch Hand

Joined: Jul 21, 2003
Posts: 281
I have used Hiberbernate in production in the past. I have used HQL of Hibernate, never used Native SQL though.

However for the new project, I have a complex database over which I do not have much control.

If I were to choose Hibernate (version 3.2) for this new project, I will have a frequent need to use Native SQL.

So, this is my question:
1. If I were to use Hibernate 3.2 with Native SQL in several places of the project, am I better off using iBATIS?

If it is not possible to answer my above question (question 1), without additional details, will it be possible to provide me some pointers and links on the following questions:
2. What are the drawbacks of using Native SQL in Hibernate?
3. What was the motivation of introducing Native SQL with the newer version of Hibernate?
4. What are the advantages of using Nattive SQL?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17249
    
    6

First I would just point out that even if you have no control over how the database is modeled, doesn't stop you from mapping Java Objects to those database tables. Hibernate can pretty much map to any database model.

As far as using straight SQL, I would choose iBatis over JDBC, and if everything you write will be native SQL queries then I can also recommend iBatis. But if it was me personally, I still would choose Hibernate.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Hibernate Native SQL versus iBATIS
 
Similar Threads
Does Hibernate not quite fit in with the enterprise application?
I need some guidens for a project
The future of iBatis
Implementing Persistance with Spring
Hibernate vs other ORMs