• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Difference between Hibernate and Dao

 
rahul vjit
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the difference between Hibernate and Dao? And also what is the relationship between both. Can we write hibernate program alone without using DAO?
Does DAO come under Springs?
 
Alexandru Gifei
Ranch Hand
Posts: 42
Java Linux Postgres Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
DAO means data access object, and it's an abstract interface for a database system. The advantage of using a DAO is that you can hide all details of data storage from the rest of the application. Hibernate as you probably know is a object-relational mapping framework implemented using Java language. A DAO can be implemented using Hibernate or even JDBC. Here is an example of an abstract DAO using Hibernate- http://www.java2s.com/Code/Java/Hibernate/GenericDaoCreate.htm. I am sure that Spring is integrated with Hibernate, but i do not know further details.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic