- Useful - Java Tutorials
- JDBC - Discussion
- JDBC - Useful Resources
- JDBC - Quick Guide
- JDBC - Questions and Answers
- JDBC - Sorting Data
- JDBC - Like Clause
- JDBC - WHERE Clause
- JDBC - Delete Records
- JDBC - Update Records
- JDBC - Select Records
- JDBC - Insert Records
- JDBC - Drop Tables
- JDBC - Create Tables
- JDBC - Drop Database
- JDBC - Select Database
- JDBC - Create Database
- JDBC - Streaming Data
- JDBC - Stored Procedure
- JDBC - Batch Processing
- JDBC - Exceptions
- JDBC - Transactions
- JDBC - Data Types
- JDBC - Result Sets
- JDBC - Statements
- JDBC - Connections
- JDBC - Driver Types
- JDBC - Sample Code
- JDBC - Environment
- JDBC - SQL Syntax
- JDBC - Introduction
- JDBC - Home
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
JDBC Tutorial
JDBC API is a Java API that can access any kind of tabular data, especially data stored in a Relational Database. JDBC works with Java on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.
Why to Learn JDBC?
JDBC stands for Java Database Connectivity, which is a standard Java API for database-independent connectivity between the Java programming language and a wide range of databases.
The JDBC pbrary includes APIs for each of the tasks mentioned below that are commonly associated with database usage.
Making a connection to a database.
Creating SQL or MySQL statements.
Executing SQL or MySQL queries in the database.
Viewing & Modifying the resulting records.
Apppcations of JDBC
Fundamentally, JDBC is a specification that provides a complete set of interfaces that allows for portable access to an underlying database. Java can be used to write different types of executables, such as −
Java Apppcations
Java Applets
Java Servlets
Java ServerPages (JSPs)
Enterprise JavaBeans (EJBs).
All of these different executables are able to use a JDBC driver to access a database, and take advantage of the stored data.
JDBC provides the same capabipties as ODBC, allowing Java programs to contain database-independent code.
The JDBC 4.0 Packages
The java.sql and javax.sql are the primary packages for JDBC 4.0. This is the latest JDBC version at the time of writing this tutorial. It offers the main classes for interacting with your data sources.
The new features in these packages include changes in the following areas −
Automatic database driver loading.
Exception handpng improvements.
Enhanced BLOB/CLOB functionapty.
Connection and statement interface enhancements.
National character set support.
SQL ROWID access.
SQL 2003 XML data type support.
Annotations.
Audience
This tutorial is designed for Java programmers who would pke to understand the JDBC framework in detail along with its architecture and actual usage.
Prerequisites
Before proceeding with this tutorial, you should have a good understanding of Java programming language. As you are going to deal with RDBMS, you should have prior exposure to SQL and Database concepts.
Advertisements