Saturday, December 18, 2010

hibernate vs jdbc response time

Hi,

Last week i received an email from one of my blog reader, he wanted to know response times for hibernate and jdbc. So below are my views on that ::

Hibernate is just a little slower than JDBC. Actually, We don't use Hibernate in very small applications or when "Persistence" is not at all an issue.

Requirement decides the use of Hibernate.

In modern multi tire applications we need such features.

JDBC is a traditional way of connecting... Hibernate is ORM based. It sees all the tables as an object so that we can optimally utilize and finetune the performance. Only thing u need to take care is the DB design. Once if the DB design is done (perfectly), i can say hibernate would be much better than JDBC.

Another advantage is that Hibernate can take an object itself as a parameter and gives room to use the Java Collections. 

So, in short, if you have a small application then implementing hibernate is a bad idea.

Cheers,

Ujjwal Soni,

No comments: