SlideShare a Scribd company logo
Unit-14
Q. Write note on JDBC. [Year 2015 & 2016]
Introduction to JDBC
Java Database Connectivity(JDBC) is an Application Programming Interface(API) used to
connect Java application with Database. JDBC is used to interact with various type of Database
such as Oracle, MS Access, My SQL and SQL Server. JDBC can also be defined as the platform-
independent interface between a relational database and Java programming. It allows java program
to execute SQL statement and retrieve result from database.
JDBC Driver
JDBC Driver is required to process SQL requests and generate result. The following are the
different types of driver available in JDBC.
• Type-1 Driver or JDBC-ODBC bridge
• Type-2 Driver or Native API Partly Java Driver
• Type-3 Driver or Network Protocol Driver
• Type-4 Driver or Thin Driver
1. JDBC-ODBC bridge
Type-1 Driver act as a bridge between JDBC and other database connectivity mechanism(ODBC).
This driver converts JDBC calls into ODBC calls and redirects the request to the ODBC driver.
Advantage
• Easy to use
• Allow easy connectivity to all database supported by the ODBC Driver.
Disadvantage
• Slow execution time
• Dependent on ODBC Driver.
• Uses Java Native Interface(JNI) to make ODBC call.
2. Native API Driver
This type of driver make use of Java Native Interface(JNI) call on database specific native client
API. These native client API are usually written in C and C++.
Advantage
• faster as compared to Type-1 Driver
• Contains additional features.
Disadvantage
• Requires native library
• Increased cost of Application
3. Network Protocol Driver
This driver translate the JDBC calls into a database server independent and Middleware server-
specific calls. Middleware server further translate JDBC calls into database specific calls.
Advantage
• Does not require any native library to be installed.
• Database Independency.
• Provide facility to switch over from one database to another database.
Disadvantage
• Slow due to increase number of network call.
4. Thin Driver
This is Driver called Pure Java Driver because. This driver interact directly with database. It does
not require any native database library, that is why it is also known as Thin Driver.
Advantage
• Does not require any native library.
• Does not require any Middleware server.
• Better Performance than other driver.
Disadvantage
• Slow due to increase number of network call.

More Related Content

What's hot (20)

PPTX
Jdbc
gee eew3
 
PPT
Jdbc drivers
Prabhat gangwar
 
PPTX
java Jdbc
Ankit Desai
 
PDF
jdbc
shreeuva
 
PPTX
Java.sql package
myrajendra
 
PPT
Jdbc
leminhvuong
 
PPTX
Java DataBase Connectivity API (JDBC API)
Luzan Baral
 
PDF
Database and Java Database Connectivity
Gary Yeh
 
PPTX
Devjyotippt
Gaurav pathak
 
DOC
jdbc document
Yamuna Devi
 
PPT
Jdbc
Smit Patel
 
PPTX
Jdbc_ravi_2016
Ravinder Singh Karki
 
PPT
JDBC Connectivity Model
kunj desai
 
PPT
Jdbcdriver
Manisha Shinde-Pawar
 
PPTX
Java- JDBC- Mazenet Solution
Mazenetsolution
 
PPT
Jdbc
myrajendra
 
PDF
Enterprise java unit-1_chapter-1
sandeep54552
 
Jdbc
gee eew3
 
Jdbc drivers
Prabhat gangwar
 
java Jdbc
Ankit Desai
 
jdbc
shreeuva
 
Java.sql package
myrajendra
 
Java DataBase Connectivity API (JDBC API)
Luzan Baral
 
Database and Java Database Connectivity
Gary Yeh
 
Devjyotippt
Gaurav pathak
 
jdbc document
Yamuna Devi
 
Jdbc_ravi_2016
Ravinder Singh Karki
 
JDBC Connectivity Model
kunj desai
 
Java- JDBC- Mazenet Solution
Mazenetsolution
 
Enterprise java unit-1_chapter-1
sandeep54552
 

Similar to Java unit 14 (20)

PPTX
jdbc.pptx jdbc.pptxjdbc.pptxjdbc.pptxjdb
devamrana27
 
PPTX
Advanced JAVA
Rajvi Vaghasiya
 
PDF
unit8_jdbc.pdf mysql and java jdbc connection
Indu32
 
PPT
JDBC java database connectivity with dbms
KhyalNayak
 
PPTX
Jdbc drivers
Saurabh Bhartiya
 
PPS
Jdbc architecture and driver types ppt
kamal kotecha
 
PPTX
java.pptx
bfgd1
 
PPTX
Chapter2 j2ee
Jafar Nesargi
 
PPTX
jdbc-130913021409-phpapp01000988www.pptx
ssuser8878c1
 
PDF
Introduction of java jdbc
firstenquiry
 
PPTX
Introduction of java jdbc
firstenquiry
 
PDF
Java and Database - Interacting with database
Amol Gaikwad
 
PPT
Unit 5-jdbc2
msafad
 
PPTX
UNIT 1 PPT- FINAL.pptx Advance Java JDBC
iamspidey0104
 
PPTX
jdbc Java Database Connectivity ujjwal matoliya jdbc.pptx
ujjwalmatoliya
 
PPTX
Java Database Connectivity (JDBC)
Pooja Talreja
 
PDF
Jdbc 1
Mukesh Tekwani
 
PPTX
JDBC
Ashish K
 
PDF
Unit 5.pdf
saturo3011
 
jdbc.pptx jdbc.pptxjdbc.pptxjdbc.pptxjdb
devamrana27
 
Advanced JAVA
Rajvi Vaghasiya
 
unit8_jdbc.pdf mysql and java jdbc connection
Indu32
 
JDBC java database connectivity with dbms
KhyalNayak
 
Jdbc drivers
Saurabh Bhartiya
 
Jdbc architecture and driver types ppt
kamal kotecha
 
java.pptx
bfgd1
 
Chapter2 j2ee
Jafar Nesargi
 
jdbc-130913021409-phpapp01000988www.pptx
ssuser8878c1
 
Introduction of java jdbc
firstenquiry
 
Introduction of java jdbc
firstenquiry
 
Java and Database - Interacting with database
Amol Gaikwad
 
Unit 5-jdbc2
msafad
 
UNIT 1 PPT- FINAL.pptx Advance Java JDBC
iamspidey0104
 
jdbc Java Database Connectivity ujjwal matoliya jdbc.pptx
ujjwalmatoliya
 
Java Database Connectivity (JDBC)
Pooja Talreja
 
JDBC
Ashish K
 
Unit 5.pdf
saturo3011
 
Ad

More from Shipra Swati (20)

PDF
Operating System-Process Scheduling
Shipra Swati
 
PDF
Operating System-Concepts of Process
Shipra Swati
 
PDF
Operating System-Introduction
Shipra Swati
 
PDF
Java unit 11
Shipra Swati
 
PDF
Java unit 12
Shipra Swati
 
PDF
Java unit 7
Shipra Swati
 
PDF
Java unit 3
Shipra Swati
 
PDF
Java unit 2
Shipra Swati
 
PDF
Java unit 1
Shipra Swati
 
PDF
OOPS_Unit_1
Shipra Swati
 
PDF
Ai lab manual
Shipra Swati
 
PDF
Fundamental of Information Technology - UNIT 8
Shipra Swati
 
PDF
Fundamental of Information Technology - UNIT 7
Shipra Swati
 
PDF
Fundamental of Information Technology - UNIT 6
Shipra Swati
 
PDF
Fundamental of Information Technology
Shipra Swati
 
PDF
Disk Management
Shipra Swati
 
PDF
File Systems
Shipra Swati
 
PDF
Memory Management
Shipra Swati
 
PDF
Deadlocks
Shipra Swati
 
PDF
Process Synchronization
Shipra Swati
 
Operating System-Process Scheduling
Shipra Swati
 
Operating System-Concepts of Process
Shipra Swati
 
Operating System-Introduction
Shipra Swati
 
Java unit 11
Shipra Swati
 
Java unit 12
Shipra Swati
 
Java unit 7
Shipra Swati
 
Java unit 3
Shipra Swati
 
Java unit 2
Shipra Swati
 
Java unit 1
Shipra Swati
 
OOPS_Unit_1
Shipra Swati
 
Ai lab manual
Shipra Swati
 
Fundamental of Information Technology - UNIT 8
Shipra Swati
 
Fundamental of Information Technology - UNIT 7
Shipra Swati
 
Fundamental of Information Technology - UNIT 6
Shipra Swati
 
Fundamental of Information Technology
Shipra Swati
 
Disk Management
Shipra Swati
 
File Systems
Shipra Swati
 
Memory Management
Shipra Swati
 
Deadlocks
Shipra Swati
 
Process Synchronization
Shipra Swati
 
Ad

Recently uploaded (20)

PDF
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
PPTX
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
PDF
Zilliz Cloud Demo for performance and scale
Zilliz
 
PPTX
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
PPTX
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
PPTX
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
PDF
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
PPTX
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
PPTX
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
PDF
Water Design_Manual_2005. KENYA FOR WASTER SUPPLY AND SEWERAGE
DancanNgutuku
 
PPTX
Hashing Introduction , hash functions and techniques
sailajam21
 
PDF
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
PDF
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
PPTX
MPMC_Module-2 xxxxxxxxxxxxxxxxxxxxx.pptx
ShivanshVaidya5
 
PPTX
Day2 B2 Best.pptx
helenjenefa1
 
PDF
Book.pdf01_Intro.ppt algorithm for preperation stu used
archu26
 
PPTX
Green Building & Energy Conservation ppt
Sagar Sarangi
 
PPTX
Break Statement in Programming with 6 Real Examples
manojpoojary2004
 
PDF
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
DOCX
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 
Unified_Cloud_Comm_Presentation anil singh ppt
anilsingh298751
 
GitOps_Without_K8s_Training_detailed git repository
DanialHabibi2
 
Zilliz Cloud Demo for performance and scale
Zilliz
 
265587293-NFPA 101 Life safety code-PPT-1.pptx
chandermwason
 
Heart Bleed Bug - A case study (Course: Cryptography and Network Security)
Adri Jovin
 
Element 11. ELECTRICITY safety and hazards
merrandomohandas
 
MAD Unit - 1 Introduction of Android IT Department
JappanMavani
 
Introduction to Neural Networks and Perceptron Learning Algorithm.pptx
Kayalvizhi A
 
GitOps_Repo_Structure for begeinner(Scaffolindg)
DanialHabibi2
 
Water Design_Manual_2005. KENYA FOR WASTER SUPPLY AND SEWERAGE
DancanNgutuku
 
Hashing Introduction , hash functions and techniques
sailajam21
 
PORTFOLIO Golam Kibria Khan — architect with a passion for thoughtful design...
MasumKhan59
 
Biomechanics of Gait: Engineering Solutions for Rehabilitation (www.kiu.ac.ug)
publication11
 
MPMC_Module-2 xxxxxxxxxxxxxxxxxxxxx.pptx
ShivanshVaidya5
 
Day2 B2 Best.pptx
helenjenefa1
 
Book.pdf01_Intro.ppt algorithm for preperation stu used
archu26
 
Green Building & Energy Conservation ppt
Sagar Sarangi
 
Break Statement in Programming with 6 Real Examples
manojpoojary2004
 
Introduction to Productivity and Quality
মোঃ ফুরকান উদ্দিন জুয়েল
 
8th International Conference on Electrical Engineering (ELEN 2025)
elelijjournal653
 

Java unit 14

  • 1. Unit-14 Q. Write note on JDBC. [Year 2015 & 2016] Introduction to JDBC Java Database Connectivity(JDBC) is an Application Programming Interface(API) used to connect Java application with Database. JDBC is used to interact with various type of Database such as Oracle, MS Access, My SQL and SQL Server. JDBC can also be defined as the platform- independent interface between a relational database and Java programming. It allows java program to execute SQL statement and retrieve result from database. JDBC Driver JDBC Driver is required to process SQL requests and generate result. The following are the different types of driver available in JDBC. • Type-1 Driver or JDBC-ODBC bridge • Type-2 Driver or Native API Partly Java Driver • Type-3 Driver or Network Protocol Driver • Type-4 Driver or Thin Driver 1. JDBC-ODBC bridge Type-1 Driver act as a bridge between JDBC and other database connectivity mechanism(ODBC). This driver converts JDBC calls into ODBC calls and redirects the request to the ODBC driver.
  • 2. Advantage • Easy to use • Allow easy connectivity to all database supported by the ODBC Driver. Disadvantage • Slow execution time • Dependent on ODBC Driver. • Uses Java Native Interface(JNI) to make ODBC call. 2. Native API Driver This type of driver make use of Java Native Interface(JNI) call on database specific native client API. These native client API are usually written in C and C++. Advantage • faster as compared to Type-1 Driver • Contains additional features. Disadvantage • Requires native library • Increased cost of Application
  • 3. 3. Network Protocol Driver This driver translate the JDBC calls into a database server independent and Middleware server- specific calls. Middleware server further translate JDBC calls into database specific calls. Advantage • Does not require any native library to be installed. • Database Independency. • Provide facility to switch over from one database to another database. Disadvantage • Slow due to increase number of network call. 4. Thin Driver This is Driver called Pure Java Driver because. This driver interact directly with database. It does not require any native database library, that is why it is also known as Thin Driver.
  • 4. Advantage • Does not require any native library. • Does not require any Middleware server. • Better Performance than other driver. Disadvantage • Slow due to increase number of network call.