Example program accessing MySQL Database through JDBC

Example program accessing MySQL Database through JDBC


Posted in : JDBC Posted on : May 9, 2016 at 6:34 PM Comments : [ 0 ]

This video tutorial teaches you to write program in Java for accessing the MySQL database through JDBC.

In this video instruction we will teach you to use the JDBC driver of MySQL database to access the data from Java program. JDBC is set of API in Java language for executing the SQL queries against database server. Every database vendor usually provides the JDBC driver for their database. Java programmer uses this driver in their Java program to make their application database aware.

As a programmer you have to learn JDBC and you should be able to use it effectively for developing database driven application. If you want to use MySQL database then follow the following steps:

1. Download and install MySQL Server

2. Download and install Eclipse on your computer

3. Download MySQL driver from mysql.com website

4. Finally add mysql-connector-xxx.jar file in your project

5. Write program to access the database

6. Compile and execute the program

Following video tutorial teaches you to access the MySQL database from Java program:

Video tutorial "How to Access MySQL through JDBC?"

After learn the above video tutorial you will be able to develop database driven applications using MySQL server. You can extend the above program and add more code to it.

What is JDBC?

JDBC is also know as Java Database Connectivity, which is API for connecting to database server from a Java program. JDBC provides a set of API for database interaction from Java program. JDBC is set of standard API for executing query against database and database vendors provides its implementation for their database.

For example MySQL provides the JDBC driver for Java, similarly Oracle, PostgreSQL and other database vendors provides driver for their respective database.

You can use JDBC driver for your selected database in your Java program, migrating Java program from one database to another database is also easy as all JDBC driver implements standard specification of JDBC.

Related JDBC Tutorials

Following are most related JDBC tutorials:

 

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics