Home Jdbc First Step towards JDBC!


Share on Google+Share on Google+

First Step towards JDBC!

First Step towards JDBC! Welcome to our JDBC Section First Step towards JDBC This article introduce you with JDBC and shows you how to create a database application to access the databases. Accessing the Database from Servlet This article shows

JDBC - Java Database Connectivity Tutorials


Java Database Connectivity or in short JDBC  is a technology that enables the java program to manipulate data stored into the database. Here is the complete tutorial on JDBC technology.

  1. What is JDBC?  
    JDBC is Java application programming interface that allows the Java programmers to access database management system from Java code. It was developed by JavaSoft, a subsidiary of Sun Microsystems.
  2. Product Components of  JDBC  
    JDBC is consists of four Components: The JDBC API, JDBC Driver Manager, The JDBC Test Suite and JDBC-ODBC Bridge.
  3. Understanding JDBC Architecture 
    JDBC is an API specification developed by Sun Microsystems that defines a uniform interface for accessing various relational databases. JDBC is a core part of the Java platform and is included in the standard JDK distribution.
  4. JDBC Driver and Its Types 
    The JDBC DriverManager class defines objects which can connect Java applications to a JDBC driver. DriverManager has traditionally been the backbone of the JDBC architecture. It is quite small and simple.
  5. JDBC Versions From First To Latest  
  6. Relational Database Concepts 
  7. Understanding Common SQL Statements 
    This section describes SELECT, INSERT, UPDATE and DELETE statements.
  8. Important JDBC Concepts  
    This section introduces you with Transactions, logging, isolation and concurrency concepts.
  9. Introduction to the java.sql Package 
  10. Understanding Driver Manager 
  11. Understanding Data Source 
  12. Understanding the Connection Object

JDBC Examples with MySQL

  1. JDBC MySQL Tutorial
    JDBC Tutorials with MySQL Database. MySQL is one of the widely used database in the world.
  2. Connecting to a MySQL Database in Java
    In this section, you will learn how to connect the MySQL database with Java file. We need to establish a connection between MySQL and Java files so that we can use MySQL driver for MySQL. 
  3. Creating a Database Table
    Here, providing you an example with code and it's description that helps you to create a database table in a database through the java file.
  4. Creating a MySQL Database Table to store Java Types
    Dear user, consider a case where we need to store a java types in our database table. This section describes how to create a MySQL database table that stores all java types.
  5. Deleting a Table from Database
    This section describes how to delete a table from database. Java provide the facility for deleting a specific table from a given database with the help of some specified methods.

  6. Retrieving Tables from a Database
    This section provides you a facility for retrieving tables from a specific database through an example. You have to know about a database that is a collection of data or information.

  7. Inserting values in MySQL database table
    Here we are going to see, how we can insert values in the MySQL database table. We know that tables store data in rows and column format. After creating a database table, you insert the values in it. 

  8. Retrieving All Rows from a Database Table
    Here, you will learn how to retrieve all rows from a database table. You know that table contains or stores the data in rows and columns format. If you want to access the data from a table then you need to use some APIs and methods.

  9. Getting Column Names from a database table in Java
    Here, providing you an example with code that retrieves all columns name in a specific database table. Sometimes, you need to know the number of columns and the names of the columns of the table then you can retrieve it with the help of this example.

  10. Deleting All Rows from a Database Table
    Consider a case where we have been given one database table, now we have to delete all the rows from the table. This section describes for deleting all rows from a specific database table.

  11. Delete a Specific Row from a Database Table
    Consider a case where we are creating a table and we have add some data in it. It may happen that we might add a wrong data in a row, now we need to delete that particular data. This can be done very easily , and in this section we are going to do the same that is, how to delete a specific row from a specific database table.

  12. Join tables in the specific database
    In this section, we are going to consider how to join two or more tables in a specific database. For this you need to have two or more table in the database. If two or more tables are available in the database then Join operation is performed otherwise not.

  13. Join tables with the NATURAL LEFT JOIN operation
    This section describes the NATURAL LEFT JOIN operation and how to retrieve data through it. In this operation we are going to retrieve data according to match the field name of another tables.

  14. Join tables with the NATURAL RIGHT JOIN operation
    This section describes the NATURAL RIGHT JOIN operation of table in a specific database. This operation join tables on the basis of matching fields but priority will be given to the right table field values.

  15. Cross Join Tables in a Specific Database
    This section introduces you to the cross join between two tables. The cross join operation retrieves data between two tables as a Cartesian product of set theory in mathematics. All data show to multiply by each rows.


  1. JDBC (Java Database Connectivity) -Tutorials 
    JDBC is essentially an Application Programming Interface (API) for executing SQL statements, and extracting the results. Using this API, we can write database clients, such as Java applets, servlets and Enterprise JavaBeans, that connect to a relational database, such as Oracle, MySQL, Sybase, Informix, Ingres, PostgreSQL, or any other database that implements this API, execute SQL statements, and process the results extracted from the database.
  2. First Step towards JDBC 
    This article introduce you with JDBC and shows you how to create a database application to access the databases.
  3. Accessing the Database from Servlet
    This article shows you how to access database from servlets. Here I am assuming that you are using win95/98/2000 and running Java Web Server.

If you enjoyed this post then why not add us on Google+? Add us to your Circles

Liked it!  Share this Tutorial

Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: January 30, 2005

Related Tutorials

Ask Questions?    Discuss: First Step towards JDBC!   View All Comments

Post your Comment

Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
rahul srivastava
March 30, 2011
Java Training

I was looking for some good java tutorials on JDBC connection with oracle.
kuldeep singh
April 10, 2011
jdbc odbc connectivity with mysql

please send connectivity
June 11, 2011
database connection

how prepared statement is different from prepared Call function????
shashi kant singh
June 21, 2011

very very Good.......
July 6, 2011
java full database

plz provide me full tutorial of database, which have next, previous button also..................
July 11, 2011

how to create database connectivity in java
July 3, 2011

Boy that raelly helps me the heck out.
August 21, 2011
jdbc odbc

August 21, 2011
jdbc odbc

September 3, 2011
JDBC and Struts

This is very good topic please send me this tutorial
September 9, 2011

good! :)
September 24, 2011

September 27, 2011

birhanu tsadik
November 23, 2011
database connection

there is no have speed to download
December 9, 2011
JDBC J2EE exit

package com.utility; import java.sql.Connection; import java.sql.DriverManager; import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; public class DBConnection { public Connection getConnection(){ Connection connection = null; try { // Load the JDBC driver String driverName = "oracle.jdbc.driver.OracleDriver"; Class.forName(driverName); // Create a connection to the database String serverName = ""; String portNumber = "1521"; String sid = "ora10g"; String url = "jdbc:oracle:thin:@" + serverName + ":" + portNumber + ":" + sid; String username = "e527205"; String password = "xLehabiyM"; connection = DriverManager.getConnection(url, username, password); /* System.out.println(connection); Statement st = connection.createStatement(); ResultSet rs = st.executeQuery("select * from teststudent"); while(rs.next()){ System.out.println("name ::"+ rs.getString(2)); }*/ } catch (Exception e) { System.out.println("Exception "+e); } return connection; } public void closeConnection(Connection conn){ if(conn!=null) try { conn.close(); } catch (SQLException e) { // TODO Auto-generated catch block e.printStackTrace(); } } }
m.goveswara reddy
January 28, 2012
tell me about jdbc

i dont no about the jdbc please tell me
February 1, 2012

help me with codes to work with
February 5, 2012
java connectivity

i'm not avle to code 'first' button for my dtabase . Please help me..........
March 13, 2012

it's very nice...
April 7, 2012
for downloading

this is better site.
May 2, 2012
Struts2 code

Struts2 code,when we copy and paste url in other browser then it will ask for login then open url related pages.
May 13, 2012

referance material provision
m sandeep
May 13, 2012

explain what is the process is gonging on internally if we connect establish with oracle database server
June 7, 2012

June 18, 2012

i want to know all java examples with question answers
July 25, 2012
my sql

please send mysql connectivity in java
ganesh mangal
August 11, 2012

Shahnawaz Alam
September 24, 2012
Advance Java

what are the two tier database design and three tier database design?what are the functions of both design?
ashish deep
November 19, 2012
online college complain management

thats very special for me