Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is hiberate a good choice , when the app is reading from the db

 
kiara lionking
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is hibernate a good choice when my app is reading from the db and not writing to it ?
 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Howdy Greenhorn! Welcome to the ranch.

Hibernate helps speed up development and make your applications easier to manage and maintain. The Hibernate Criteria API is a big part of that, making it easier for Java programmers to create database queries by giving them an object-oriented approach to their problems.

Underneath the covers, Hibernate is simply using JDBC, so if JDBC is good for reading from the db, then Hibernate should be as well.

Oh, and I loved Kiara from the Lionking, but we like to try and abide by the JavaRanch Naming policy whenever we can. People always seem so much nicer and friendlier to one another when they're using their real names.

Looking for some more great questions, Greenhorn!

-Cameron McKenzie
 
Paul Anilprem
Enthuware Software Support
Ranch Hand
Posts: 3817
10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kiara lionking wrote:Is hibernate a good choice when my app is reading from the db and not writing to it ?


The answer depends on what kind of things are you reading and for what purpose. Is your application working off of objects (for example, Person, Employee, Student etc.) or raw data (for example, get last one year's transactions or stock prices of all 500 stocks in an index). How much data do you retrieve for generating your pages? How many concurrent users do you plan to support.

It is true that Hibernate uses JDBC internally but it adds a LOT of functionality over it and all that functionality (caching, conversion, synchronization) is not free or even cheap. So, IMHO, Hibernate may not necessarily be better or even good in every situation.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic