• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Java desktop database app with JPA and Hibernate

Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

My name is Marcel from the Netherlands and I am new to this forum.
I am already familiar with C++ and now I want to learn Java, I already have code a couple of programs and read a couple of books about Java.
And now I am working on a bigger application which I will use as a practice for my preparation for the SCJP certification, I came here because I have a couple of questions about Hibernate/JPA.

I am designing a desktop database application for a company, this application is going to be used for customer orders, purchasing orders, customer data, invoices, production etc.
The designing phase (UML diagrams and database model) is almost finished and I have created a lot of tables and joins, I am now almost at the stage of going to write the code.
I am using Netbeans IDE 6.8 and MS SQL Server 2008 Standard edition.

The question that I have are as follows:
  • I want to use the JPA to map my tables to object oriented classes, in Netbeans you have the opportunity to choose between TopLink and Hibernate. I am thinking of using Hibernate but on the Internet I see only Hibernate and web application examples. Can you use Hibernate for Desktop database application, or is there a better solution for this?
  • The database that I have designed is composed from a lot of tables (more than 50), my question is how do you code this into Netbeans, do you make one big project and put there all your Entity classes, or do you divide this into packages (corresponding to the schemas in the database)? Or make multiple projects?
  • How does Hibernate work with MS SQL Server, and how does Java. On the Internet I see not much examples where the use Java technologies and MS SQL Server, is this not a good combination?
  • Are there any good books about this topic (Hibernate) that can be used for the development of desktop database applications?

  • Thanks,

    Marcel van der Ven
    Posts: 12617
    IntelliJ IDE Ruby
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    There's no difference between environments as far as Hibernate is concerned.

    Any DB that has a JDBC driver works with Java.
    Ranch Hand
    Posts: 40
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    I don't know NetBean but if you use Eclipse then you can convert your Database into Java code and then reverse this code inside a class diagram.
    I have found this tutorial : http://www.forum-omondo.com/documentation_eclipseuml_2008/Eclipse_Database/Activate_JPA_Perspective/oracle_integration.html

    The database to java code conversion is provided by Oracle free Eclipse tool and then you can use either EclipseUML Omondo as explained in the tutorial or any other modeling tool having reverse engineering feature.
    Posts: 21
    Android Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    If you plan for Netbeans 6.8 is superb. You will nice tutorials of JPA & Hibernate,Hibernate with JPA from Netbeans.

    Also here are some links which are useful to you to work on with Hibernate & JPA.

    Danger, 10,000 volts, very electic .... tiny ad:
    Thread Boost feature
      Bookmark Topic Watch Topic
    • New Topic