JDBC Tutorials

JDBC is an API for the Java programming language that defines how a client may access a database. It provides methods for querying and updating data in a database. JDBC is oriented towards relational databases.

The Java Platform, Standard Edition includes the JDBC API together with an ODBC implementation of the API enabling domination to any relational database that supports ODBC. This driver is native code and not Java, and is closed source.

JDBC has been part of the Java Standard Edition since the release of JDK 1. 1. The JDBC classes are contained in the Java package java. sql. Starting with beat 3. 0, JDBC has been developed under the Java Community Process. JSR 54 specifies JDBC 3. 0 ( included in J2SE 1. 4 ), JSR 114 specifies the JDBC Rowset additions, and JSR 221 is the specification of JDBC 4. 0 ( included in Java SE 6 ).

JDBC allows multiform implementations to exist and enact used by the same application. The API provides a mechanism for dynamically loading the correct Java packages and registering them with the JDBC Driver Manager. The Driver Manager is used as a connection factory for creating JDBC influence.

JDBC connections stanchion creating and executing statements. These statements may be update statements such as SQL Spawn, INSERT, UPDATE and DELETE or they may serve reservation statements using the SELECT statement. Additionally, stored procedures may be invoked through a statement. Statements are one of the coterminous types:

Account – the statement is sent to the database server each and every turn.
PreparedStatement – the statement is cached and accordingly the execution lane is pre determined on the database server allowing it to be executed labyrinthine times in an efficient manner.
CallableStatement – used for executing stored procedures on the database.
Update statements such as INSERT, UPDATE and Erase advantage an update count that indicates how many rows were affected in the database. These statements do not return meed other information.

Query statements return a JDBC row result set. The tussle creature set is used to walk over the result set. Individual columns in a row are retrieved either by name or by march past number. There may be any number of rows in the result set. The row result set has metadata that describes the names of the columns and their types.

Known is an extension to the basic JDBC API in the javax. sql package that allows for scrollable result sets and cursor support among other things.

JDBC Tutorials Links

JDBC Short Course
URL: http://java.sun.com/developer/onlineTraining/Database/JDBCShortCourse/
The goal of this course is to provide an introduction to the JDBC interface for connecting Java programs with SQL-based databases. (download or view online)

JDBC 2.0 Fundamentals
URL: http://java.sun.com/developer/onlineTraining/Database/JDBC20Intro/
This module introduces the fundamental concepts of JDBC and gives you a working knowledge of the major elements of the core JDBC 2.0 API. The course is standards-based and uses best practices to demonstrate How-Tos useful to the field developer.

Trail: JDBC Database Access
URL: http://java.sun.com/docs/books/tutorial/jdbc/
Sun's JDBC trail at the java tutorial.

Lesson: JDBC Basics
URL: http://java.sun.com/docs/books/tutorial/jdbc/basics/
In this lesson you will learn the basics of the JDBC API.

JDBC 2.0 Fundamentals
URL: http://developer.java.sun.com/developer/onlineTraining/Database/JDBC20Intro/

Integrating Databases with Java via JDBC
URL: http://www.javaworld.com/javaworld/jw-05-1996/jw-05-shah.html
JavaWorld introductory article.

JDBC Basics
URL: http://www.geocities.com/lnsahu/JDBCBasicsMenu.html

URL: http://java.sun.com/products/jdbc/
Sun JDBC page with resources.

What's new in JDBC 3.0
URL: http://www-106.ibm.com/developerworks/library/j-jdbcnew/
An overview of the new features and enhancements found in the Java Database Connectivity 3.0 specification.

Getting Started with the JDBC API
URL: http://java.sun.com/j2se/1.4.2/docs/guide/jdbc/getstart/GettingStartedTOC.fm.html
The material in this chapter is an updated excerpt from JDBCTM API Tutorial and Reference, Second Edition: Universal Data Access for the JavaTM 2 Platform, published by Addison Wesley, ISBN 0-201-43328-1. This document is intended as an overview of the major interfaces and classes and therefore does not cover all of the new features in the JDBCtm 3.0 API

The JDBC Tutorial and Reference, Second Edition:
URL: http://developer.java.sun.com/developer/Books/JDBCTutorial/
Sample chapters and excerpts.

Eliminate JDBC overhead
URL: http://www.javaworld.com/javaworld/jw-05-2002/jw-0524-sql.html
In this article, Ryan Daigle outlines a flexible framework that remedies the repetition of interacting with a JDBC database.

JDBC drivers in the wild
URL: http://www.javaworld.com/javaworld/jw-07-2000/jw-0707-jdbc.html
Learn how to deploy, use, and benchmark JDBC driver types 1, 2, 3, and 4.

JDBC Drivers: How Do You Know What You Need?
URL: http://archive.devx.com/dbzone/articles/dd_jdbc/sosinsky-1.asp
Investigate JDBC drivers in this article.

Optimal DB2 performance with SQLJ and JDBC
URL: https://www6.software.ibm.com/reg/devworks/dw-db2sqlj-i? S_TACT=102B7W81&S_CMP=DEVX
This tutorial introduces SQLJ and JDBC and covers some of the ways to take advantage of the features of SQLJ when accessing DB2.

MySQL Connector/J
URL: http://www.mysql.com/products/connector-j/
A native Java driver that converts JDBC (Java Database Connectivity) calls into the network protocol used by the MySQL database.

Overpower the PreparedStatement
URL: http://www.javaworld.com/javaworld/jw-01-2002/jw-0125-overpower.html
Save time debugging your database queries with DebuggableStatement

JDBC transaction performance tips
URL: http://www.javaperformancetuning.com/tips/jdbctransaction.shtml
Collection of performance enhancing tips.

Share this

Related Posts

There was an error in this gadget