File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Object Relational Mapping and the fly likes Hibernate or JDBC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Make it so: Java DB Connections & Transactions this week in the JDBC forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate or JDBC " Watch "Hibernate or JDBC " New topic

Hibernate or JDBC

Suresh Kumar Rajendran

Joined: Oct 31, 2007
Posts: 21
Hi All,

I have some questions on general hibernate and JDBC.

1) Can we apply hibernate framework in application which points to database(All Tables) where having only READ access and don't have WRITE? Since hibernate objects (Session, Transaction, SessionFactory) would do some manipulation and give PO objects , will these required right access to database?.

2) Is there any situation in which we cannot apply Hibernate framework and the same conditon JDBC will workout there?


Jimmy Clark
Ranch Hand

Joined: Apr 16, 2008
Posts: 2187
One of the primary reasons for using the Hibernate framework is to build a "persistence" component for an application. Using Hibernate for simple "Read-only" operations is overkill, when simple JDBC calls to stored procedures would work fine. However, Hibernate does include various security mechanisms at various levels to help implement a range of possible security requirements. Hibernate is an implementation of JDBC, it is not some totally different way to code database operations.
Suresh Kumar Rajendran

Joined: Oct 31, 2007
Posts: 21
Thanks Jim.
I agree. Here's the link:
subject: Hibernate or JDBC
It's not a secret anymore!