File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes JDBC and Relational Databases and the fly likes Java and MySQL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Databases » JDBC and Relational Databases
Bookmark "Java and MySQL" Watch "Java and MySQL" New topic

Java and MySQL

John Malto

Joined: Sep 26, 2012
Posts: 2
Hi all,

this for our thesis so please help me out.

It's my first time using java with a DB program but I know the basics of java and MySQL.
What my program needs to do is that it should be able to store data as well as a corresponding image for that specific data.
So where should I start? I already have MySQL up and running also Netbeans for java programming.

I already have a user interface using java swing.

Thanks in advance!
Jelle Klap

Joined: Mar 10, 2008
Posts: 1951

Well if you want your Java application to communicate with a dabase you should start by taking a look at the JDBC API. You should avoid JPA providers like Hibernate and other abstractions on top of plain JDBC for now, at least that would be my recommendation. Here's a basic JDBC tutorial, which would be a good place to start. For MySQL you'll need to download its JDBC driver, which they call Connector/J.

Build a man a fire, and he'll be warm for a day. Set a man on fire, and he'll be warm for the rest of his life.
John Malto

Joined: Sep 26, 2012
Posts: 2
thanks a lot! i know there's a tutorial about this somewhere but i just couldn't find it. Hmm. I have MySQL 5.5. I think it already has Connector/J.
I agree. Here's the link:
subject: Java and MySQL
jQuery in Action, 3rd edition