Alex Rivera | Logout

What is the best database to use with a java program?

Asked 2009-07-04T12:13:28.073
11

I've been struggling to get a Java program to connect to MS SQL Server, and I'm starting to wonder if MySQL would be a better choice for my (learning) project.

Sun's tutorials refer to Java DB, but I've never heard of that in any other context, so it seems not the most useful database to learn about.

I appreciate any insight into the most natural way to connect Java to a commonly used database.

Edit
Report

1 Answer

5

Java DB is Apache Derby rebranded and included in the JDK. It is ok, and it is much easier to install than natively running databases.

It is very important to use a good driver to the database! That might solve all your connection problems.

Also note that if you switch database, you most likely also need to change your SQL unless you use a layer like Hibernate or JPA.

answered 2009-07-04T14:33:05.860

Your Answer