File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Object Relational Mapping and the fly likes JDBC and Hibernate Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Object Relational Mapping
Reply Bookmark "JDBC and Hibernate" Watch "JDBC and Hibernate" New topic
Author

JDBC and Hibernate

Jim Patrick
Ranch Hand

Joined: Dec 27, 2005
Posts: 39

Hi

I am new to hibernate. Can someone please shed light on some of my doubts?

1) what is the difference between developing a web application using Hibernate and without using Hibernate?

2) I want to know how we can integrate Hibernate into a web application..

3) Is there any need of JDBC if we use Hibernate?

Rgds,
Jim
[ July 23, 2006: Message edited by: Jim Patrick ]
Scott Johnson
Ranch Hand

Joined: Aug 24, 2005
Posts: 518
1) what is the difference between developing a web application using Hibernate and without using Hibernate?


Hibernate provides an object oriented way to retrieve and persist data to a relational database. It automatically creates and executes sqls, populates beans using data retrieved from the database and persists data from beans to the database. Developer productivity is improved because they need to write less code. Performance is improved because of Hibernate's two layers of cache. The portability of your code increases because Hibernate automatically handles any database specific syntax.

A drawback is that mappings must be created between the beans and tables, but this is mitigated by tools such as Middlegen that can generate the mappings given the table schemas. There are also tools that can generate the mappings from beans.

2) I want to know how we can integrate Hibernate into a web application..


You build your application as you would with JDBC, except your Data Access Objects (DAOs) use the Hibernate API to retrieve/persist data instead of using the JDBC API.

3) Is there any need of JDBC if we use Hibernate?


Yes, Hibernate uses JDBC to communicate with the database.

Complete the Hibernate Tutorial for a crash course on how to use Hibernate.
[ July 23, 2006: Message edited by: Scott Johnson ]
 
IntelliJ Java IDE
 
subject: JDBC and Hibernate
 
Threads others viewed
Spring JDBC Vs Hibernate?
Application Perfomance issue
Hibernate and Jdbc
weblogic -tomcat deployment
request for name of tools that can be used to analyze the performance bottle neck in app
MyEclipse, The Clear Choice

cast iron skillet 49er

more from paul wheaton's glorious empire of web junk: cast iron skillet diatomaceous earth rocket mass heater sepp holzer raised garden beds raising chickens lawn care CFL flea control missoula heat permaculture