Free tutorials for Java, Eclipse and Web programming



Follow me on twitter

MySQL and Java JDBC - Tutorial

Lars Vogel

Version 0.4

14.09.2009

Revision History
Revision 0.125.05.2008Lars Vogel
Split Java part from http://www.vogella.de/articles/MySQL/article.html
Revision 0.212.09.2009Lars Vogel
Rework
Revision 0.313.09.2009Lars Vogel
JDBC described
Revision 0.414.09.2009Lars Vogel
Metadata

MySQL and Java JDBC

This article describes how to use Java JDBC to connect to MySQL and perform SQL queries, database inserts and deletes.


Table of Contents

1. Java Database Connectivity (JDBC)
2. Introduction to MySQL
3. MySQL JDBC driver
4. Create example database
5. Java JDBC
6. Thank you
7. Questions and Discussion
8. Links and Literature

1. Java Database Connectivity (JDBC)

The interface for accessing relational databases from Java is JDBC. Via JDBC you maintain the databases connection, issue database queries and updates and receive the results.

JDBC is an interface independently of any database. For each database you require the database specific implementation of the JDBC driver.