JDBC
JDBC
Contents
• Client-Server
• JDBC
• JDBC Drivers
• JDBC API
Client-Server
The Architecture
Introduction
Web Client
Business Database
Logic Storage
GUI Client
N-Tier Architecture
Message
Server
JDBC
The API
Introduction
Types
Types of JDBC Drivers
Client Machine
Java Application
JDBC-ODBC Bridge
Server Machine
Vendor DB Library DB
Type II
Client Machine
Java Application
Database
Server
Vendor DB Library DB
Type III
Client Machine
Java Application
Server Machine
Database
Server
Net-Protocol/ All- Middleware/
Java Driver Application
Server DB
Type IV
Client Machine
Java Application
Server Machine
Database
Server
Native-Protocol/
Pure Java Driver DB
Which driver to use???
Programming
Introduction
• Statement (I)
• For performing sql queries and Batch of
statements
• PreparedStatement (I)
• For creating Pre-Compiled sql queries
• CallableStatement (I)
• For calling Stored Procedures and functions
Getting Result
Zubair Shaikh
[email protected]
Presentation Version 1.1