How to manage a MySQL database using Java

Associate
Joined
8 Apr 2004
Posts
2,053
Hi, I currently have written a database in MySQL and working on a Java program which will manage it. What I'm not sure about is how I connect the two together? Do I need some kind of connector, or is there some sort of bigger application that will manage both and connect them easily? I've heard of using Eclipse or something to write both my Java programs in and manage MySQL database, but I'm not sure of the details about setting this up.

If it helps, the database contains data about a particular college department, and I have to write a program that uses this data to generate weekly class timetables which satisfy certain requirements.

If anyone could give me some simple tips on this, and where I should start looking on the internet, it would be much appreciated. I don't need long replies or anything, unless you insist on it. Regards
 
Does it have a requirement in Java, or could you not use a better language for this purpose.

PHP springs to my mind....
 
You need to use some kit called Mysql Connector/j which acts as an interface between JDBC (java) and Mysql. I have some source on my machine at home which I'll upload later to demonstrate.
 
Thanks for the replies so far. I'll check them out. I do remember trying out some tutorials once where I wrote some simple Java program which did all the querying, inserting and deleting data from a simple MySQL database, but that was a long time ago and I have forgotten what programs and additional bits I used.

I have only had Java experience and never tried PHP before, so I wouldn't know. Also, isn't PHP more of a web-based programming language? I've done one web-based database project before, in which I used JSP instead. Unfortunately, this project that I'm working on now has to be run locally and cannot be web-based.
 
Last edited:
Back
Top Bottom