I know this might sound like a daft question, but I have been looking at it for a few days now and can'tdecide if it's for me or not. I really like the way it treats each DB result as an Object/Bean for adding, deleting, updating etc. This would make my project a lot easier to manage and teh code a lot tidier. But the plus is also the minus, because surely if Hibernate is creating Objects for each result, this must place a massive strain on the Server/Memory!
The project I am working on currently has a single DB, although I may look to 'horizontal growth' (I believe the buzz term is) in the furture, but initially this DB will have 1,000s of enteries and in the next year will almost certainly hit the 1mill+ mark (and will most likely continue to grow over the next few years)
As I say I plan to spread the DB out into several DBs based on Country (this should limit records to maybe 1-2 million depending on country) but still if I was to do a "SELECT * FROM DB_UK" type of search and the results returned say 2million results, surely this would cripple the Server!
Or am I completely off the mark with my understanding of Hibernate?
Also, if Hibernate is suitable to mass DBs like this, is there a good way of developing DB conn pooling? I have an existing Conn Pool for my old basic JDBC/SQL commands which were called from a Class I wrote, but I very much doubt I can use it with Hibernate
Oh and my DB is initially MySQL, but again if funding is made available will be upgraded to most likely Oracle.
What materials have you looked at so far about learning Hibernate? I highly recommend Java Persistence with Hibernate from Manning publishing.
What you explained is exactly what Hibernate can do and is for.
For your example of 1 million records returned and memory strain, yes it will be for Hibernate and for JDBC. More for Hibernate. But what you learn with Hibernate is the concept of the Persistent State, the Session object, and making sure you keep track of what objects you are loading into it and such. But I would also state that what user can read through 1 million records at once with a "select * from table A", this is again an issue you will find with anything even straight JDBC.
The minus I always state with Hibernate is always that there is a good size learning curve, because it has so much and is so powerful, and covers everything that you will need.