I have some queries that need to be addressed. I would be really helpful if someone can help me out: I have project at hand - to develop an information system- Any IS. I am planning to use Java as the front end with Oracle or MySql as Back end. So i am not pretty sure which one goes well with Java- Oracle or MySQL. And i have heard about Hibernate from my friend which will ease the Object Relational Mapping. Can Hibernate be used for developing the IS? What about JDBC? Will there be a need for JDBC if one's using Hibernate.
I am very new to Hibernate and JDBC. But have done loads of coding in Java. So please help me out in deciding: 1. Which back end to use with Java. 2. Hibernate - Can it be used for Information System development. 3. JDBC- How's it different from Hibernate
Will there be a need for JDBC if one's using Hibernate.
Yes. Hibernate uses JDBC to talk to the database.
1. Which back end to use with Java.
Either Oracle or MySQL would be fine.
2. Hibernate - Can it be used for Information System development.
It can be used for any Java application that uses a relational database.
3. JDBC- How's it different from Hibernate
It is much more low-level. It provides the nuts and bolts of how Java communicates with a database. Hibernate extends on this to abstract away from the basics. [ June 10, 2008: Message edited by: Paul Sturrock ]
As far as 'which back end to use', I might be a bit more egalitarian than Paul and let you know that pretty much any JDBC compliant database can be used with Hibernate. The examples on my website use MySQL, but in my daily life, I work with IBM, so I'm always connecting to db2.
Hibernate does translate all of its calls into SQL statements that are marshalled to the database through JDBC, so while you develop your persistence based applications in a very object-oriented way through Hibernate, in the end, it all gets turned into SQL.
I've got a variety of tutorials on my site that will get you started. I might even recommend doing those before getting too deep into Java Persistence with Hibernate. It's a very advanced book - the most complete book on Hibernate out there. But sometimes a good, simple example will help you get started and build some confidence.
What do you need to get started? A database, JDK 1.5 or better if you want to use annotations, JDBC drivers for your database, and the Hibernate core and Hibernate Annotations library (optional) downloaded from Hibernate.org. That's all you need to get going.
I've got a tutorial on youtube that shows you how to set up a windows machine for doing Hibernate programming:
@Cameron Wallace McKenzie: Thanks a lot for a detailed reply. And i was going through your website. Seems like i need to get started at the earliest. I am planning to use MySql database on Ubuntu 8.04.
And i will surely get back to the forum for my doubts as i proceed with my course of study. Thanks once again