ok, i'm taking database design in summer II, and i want to use java for my main project in the class.
but what classes should i be looking at for actually "connecting" my main program/ user interface to a database. And also, i dont want to use access i want to use a "free" database program. If there are any would java's oleDbDataAdapter recognize it?
Justin Fox
You down with OOP? Yeah you know me!
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35249
7
posted
0
Not sure what "oleDbDataAdapter" is, but there are plenty of databases available for free: PostgreSQL and MySQL written in C (and thus needing to be installed), Derby and HSQL written in Java. The classes to be used are principally the ones in the java.sql package. The Sun Java Tutorial has a section on JDBC.
As Ulf already said, JDBC is the standard Java API for connecting to databases. A good thing about JDBC is that it allows you to connect to any database for which there is a JDBC driver available in the same way. There are JDBC drivers for almost all databases, including MySQL, Oracle, Microsoft SQL Server, etc.
In JDK 6, a small, free, 100% Java database is already included: Java DB. So if you have JDK 6, have a look at that. Note, Java DB is actually the same thing as Apache Derby.
I don't know what "oleDbDataAdapter" is but it sounds like Microsoft technology, and this is not something you need to connect to a database from Java.