File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Use of Hibernate

 
Gajanan Bandale
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Friends, Here, I want to know one basic thing about Hibernate.
1) Why Hibernate?
2) What is the need/use of Hibernate in Project?
3) In which condition we use Hibernate?
4) Is it the replacement of JDBC or EJB (Entity Bean)?
5) Exactly where we use Hibernate?

 
Khadija Lokhandwala
Ranch Hand
Posts: 33
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hibernate is
1.A ORM Tool
2.It saves you from the database mapping as in EJB 2.0 by just deefining the table structure in .xml files.
3.Can be used whenever you need to work with database.
4.Has its own query Language (Hibernate Query Language) which makes it easier to fetch data.
 
Gajanan Bandale
Greenhorn
Posts: 22
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Khadija Lokhandwala:
Hibernate is
1.A ORM Tool
2.It saves you from the database mapping as in EJB 2.0 by just deefining the table structure in .xml files.
3.Can be used whenever you need to work with database.
4.Has its own query Language (Hibernate Query Language) which makes it easier to fetch data.



Thanks Dude!!

Actually i know Hibernat little bit also i have some hands on experience with Hibernate coding but actually i want to know that

What is the need of Using Hibernate? I mean to say we use JDBC for connection, they what about Hibernate? What is its role in any project? I would like to know about its Basic......... such questions like
What? Why? Where?


 
Mark Spritzler
ranger
Sheriff
Posts: 17276
6
IntelliJ IDE Mac Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll pu tthis simply, because you can write a book answering those questions.

Why I use Hibernate over JDBC.

1. Easier to code.
2. Saves over 40% of JDBC code, which is a real pain to code to ResultSets and converting them into Java objects.
3. JDBC works with datasets, Hibernate works with Java Objects. (so to speak)
4. In some cases, Hibernate will be faster than JDBC, because of caching.

Mark
 
Muhammad Ghufran
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The basic objective of Hibernate is to achive independence from database. You can writer yor datalayer and plug it with any Database liek Oracle , MySql, etc without changeing any code.
 
Consider Paul's rocket mass heater.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic