Announcement Announcement Module
No announcement yet.
Hibernate or JDBCTemplate Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Hibernate or JDBCTemplate

    Hi Guys

    Just wanted to see what your thoughts are when it comes to choosing whether to use Hibernate or JDBCTemplate.

    I am starting a new project and at the moment i cant really decide whether to use Hibernate or JDBCTemplate for database operations.

    Initially there will only be about 6 tables involved and there will be lots of SELECT/INSERT/UPDATE operations involved per user request.

    I have used Hibernate in other projects but ran into performance problems due to very large object graphs etc. So what do you think would be the best to use ?

    Application i am working on is like a Online Questionnaire where there will be about 50 to 100 questions pers exam and traffic wise there will be atleast 400+ users per day using it.

    Any input will be appreciated.

    thanks in advance

  • #2
    Imo, 400 users per day of an online questionnaire is a load that can be easily handled by early 90s technology, so I wouldn't really worry about performance.


    • #3
      If it's quite simple, I'd be tempted to go with JdbcTemplate. Likewise you don't have to go the whole hog and use Hibernate, have you looked at iBatis?


      • #4
        Hey ozGuy,

        I'd go with whatever you're the most comfortable with; I realize that the JdbcTemplate-route is seemingly easier, but I'm so used to using Hibernate-based DAOs that I could write the app much quicker via Hibernate.


        • #5
          Either way, if you keep this in the data access layer, switching them out in the future shouldn't be too hard (obviously Jdbc version would require calls to replace Hibernate's transparent persistence). I'm currently porting raw Jdbc code, and I decided to go with JdbcTemplate because everyone else will understand what's going on. I'm comfortable with Hibernate, and I'm sure it would pick it up quite quickly but it's more difficult route at the current time.


          • #6
            what about that hibernate
            if i dont bad remember dont support subqueries

            think about if you work with jasperreport, jdbcTemplate is a nice option

            about ibatis no worked with that yet