I want to have some graph structure of objects in my program and I shall use JPA (hibernate) “because it is better than raw JDBC”.
My being sceptical about defining everything in hibernate, and letting hibernate create a data schema for me, I defined my two own tables. One holding the objects and one holding the relationships (connections) between these objects – tipical 3NF.
Will hibernate be able to handle this structure efficiently? Or more importantly, is this approach stupid? Shall I lay all my eggs into the hibernate basket?
For the performance in this case it doesn’t matter if you use JDBC or Hibernate. You can have mostly the same select statements with both of them.
Hibernate has some advantages (for example portability between different databases; an extra abstraction layer). The disadvantage of Hibernate is (in your case), you have to learn it first, but for your CV that is an advantage.
By the way I don’t use the possibility of Hibernate to create a data schema. In my opinion it is the wrong direction. The database, where the bottleneck can be, should be created first. I create my db schemas always manually.