Results 1 to 5 of 5
  1. #1
    sephiroth2212 is offline Member
    Join Date
    Apr 2011
    Location
    Changchun, China
    Posts
    3
    Rep Power
    0

    Default Should I be using hibernate?

    Hi all. I am thinking of creating lesson management software for the school I currently work for. I wish the have all the individual pieces of a lesson stored in a MySQL database (eg. games, activities, etc) as well as schedules, messages and lots of other pieces of information. I have spent hours and hours writing SQL statements and converting datatypes so that my program can work with MySQL. I have done a little bit of research into Hibernate today and think it may be the best way to go about it. I would genuinely appreciate any advice you can give me about both the advantages and disadvantages of both approaches. Are there any other approaches that I have failed to see? I'm sure there is an easier and more efficient way to go about it than what I have been.
    Cheers for any info you can give me.

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,439
    Rep Power
    18

    Default

    You still need some SQL statements.
    You still need conversion stuff, though this will be in the form of mappings (either via XML, or annotations).
    But Hibernate will hide lots of code away from you, and can be easier (once the above mapping work is done) to work with.

    Personally? It depends on how you've written your JDBC code and your Dao layer. I have little problem with either method. Both can be mucked up by poor design.

  3. #3
    sephiroth2212 is offline Member
    Join Date
    Apr 2011
    Location
    Changchun, China
    Posts
    3
    Rep Power
    0

    Default Cheers

    Thank's for your reply. I've looked into it some more and I think hibernate would be quite suitable. My code works with the JDBC code. It's just a matter of writing a lot of SQL to accomplish fairly simple tasks. I've found Hibernate also lets you write direct JDBC code to accomplish the tasks that Hibernate might be less suited for. Are there any major drawbacks of Hibernate that I should be aware of? Again, thanks for the reply. :)

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,439
    Rep Power
    18

    Default

    As with any other framework, read the docs...keep the link to them handy when you're writing stuff.

    Other than that I've not really hit problems, outside of large systems where it's not really Hibernate but the inevitable consequences of getting the order of things wrong. You'll probably not hit any of that.

  5. #5
    atul.optimist is offline Member
    Join Date
    Oct 2013
    Location
    India
    Posts
    6
    Rep Power
    0

    Default Re: Should I be using hibernate?

    yes...follow the this URL

    Removed advertising link.
    Last edited by Tolls; 10-11-2013 at 09:28 AM.

Similar Threads

  1. Hibernate
    By redforce.bala in forum Advanced Java
    Replies: 0
    Last Post: 10-02-2010, 11:49 AM
  2. new to hibernate
    By ajhansiprasad in forum Advanced Java
    Replies: 2
    Last Post: 11-06-2008, 05:20 AM
  3. Hibernate, help me
    By Nick15 in forum JDBC
    Replies: 2
    Last Post: 06-05-2008, 03:39 PM
  4. Hibernate Use
    By sireesha in forum JDBC
    Replies: 2
    Last Post: 05-21-2008, 03:05 AM
  5. Replies: 2
    Last Post: 06-30-2007, 03:01 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •