This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Databases » Object Relational Mapping
Bookmark "Hibernate or JDBC " Watch "Hibernate or JDBC " New topic
Author

Hibernate or JDBC

Suresh Kumar Rajendran
Greenhorn

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?


Regards,
Suresh

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
Greenhorn

Joined: Oct 31, 2007
Posts: 21
Thanks Jim.
 
 
subject: Hibernate or JDBC