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

PPT
PPTX
Types of Drivers in JDBC
PPTX
JDBC Driver Types
PPTX
DOC
Jdbc drivers
DOCX
Jdbc driver types
PPTX
Jdbc driver types
PPT
JDBC Architecture and Drivers
Types of Drivers in JDBC
JDBC Driver Types
Jdbc drivers
Jdbc driver types
Jdbc driver types
JDBC Architecture and Drivers

What's hot (20)

PPTX
Jdbc
PPT
Jdbc drivers
PPTX
java Jdbc
PDF
jdbc
PPTX
Java.sql package
PPT
PPTX
Java DataBase Connectivity API (JDBC API)
PDF
Database and Java Database Connectivity
PPTX
Devjyotippt
DOC
jdbc document
PPT
PPTX
Jdbc_ravi_2016
PPT
JDBC Connectivity Model
PPT
PPTX
Java- JDBC- Mazenet Solution
PPT
PDF
Enterprise java unit-1_chapter-1
Jdbc
Jdbc drivers
java Jdbc
jdbc
Java.sql package
Java DataBase Connectivity API (JDBC API)
Database and Java Database Connectivity
Devjyotippt
jdbc document
Jdbc_ravi_2016
JDBC Connectivity Model
Java- JDBC- Mazenet Solution
Enterprise java unit-1_chapter-1
Ad

Similar to Java unit 14 (20)

PPTX
jdbc.pptx jdbc.pptxjdbc.pptxjdbc.pptxjdb
PPTX
Advanced JAVA
PDF
unit8_jdbc.pdf mysql and java jdbc connection
PPT
JDBC java database connectivity with dbms
PPTX
Jdbc drivers
PPS
Jdbc architecture and driver types ppt
PPTX
java.pptx
PPTX
Chapter2 j2ee
PPTX
jdbc-130913021409-phpapp01000988www.pptx
PPTX
Introduction of java jdbc
PDF
Introduction of java jdbc
PDF
Java and Database - Interacting with database
PPT
Unit 5-jdbc2
PPTX
UNIT 1 PPT- FINAL.pptx Advance Java JDBC
PPTX
jdbc Java Database Connectivity ujjwal matoliya jdbc.pptx
PPTX
Java Database Connectivity (JDBC)
PDF
PPTX
JDBC
PDF
Unit 5.pdf
jdbc.pptx jdbc.pptxjdbc.pptxjdbc.pptxjdb
Advanced JAVA
unit8_jdbc.pdf mysql and java jdbc connection
JDBC java database connectivity with dbms
Jdbc drivers
Jdbc architecture and driver types ppt
java.pptx
Chapter2 j2ee
jdbc-130913021409-phpapp01000988www.pptx
Introduction of java jdbc
Introduction of java jdbc
Java and Database - Interacting with database
Unit 5-jdbc2
UNIT 1 PPT- FINAL.pptx Advance Java JDBC
jdbc Java Database Connectivity ujjwal matoliya jdbc.pptx
Java Database Connectivity (JDBC)
JDBC
Unit 5.pdf
Ad

More from Shipra Swati (20)

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

Recently uploaded (20)

PDF
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
PPTX
CH1 Production IntroductoryConcepts.pptx
PPTX
UNIT 4 Total Quality Management .pptx
PPTX
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
PPTX
additive manufacturing of ss316l using mig welding
PDF
Embodied AI: Ushering in the Next Era of Intelligent Systems
PDF
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
PPTX
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
PPTX
Construction Project Organization Group 2.pptx
PDF
composite construction of structures.pdf
PPTX
Current and future trends in Computer Vision.pptx
PDF
Well-logging-methods_new................
PDF
PPT on Performance Review to get promotions
PPTX
OOP with Java - Java Introduction (Basics)
PPT
Mechanical Engineering MATERIALS Selection
PDF
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
PPTX
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
PPTX
bas. eng. economics group 4 presentation 1.pptx
PDF
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
PDF
Model Code of Practice - Construction Work - 21102022 .pdf
BMEC211 - INTRODUCTION TO MECHATRONICS-1.pdf
CH1 Production IntroductoryConcepts.pptx
UNIT 4 Total Quality Management .pptx
FINAL REVIEW FOR COPD DIANOSIS FOR PULMONARY DISEASE.pptx
additive manufacturing of ss316l using mig welding
Embodied AI: Ushering in the Next Era of Intelligent Systems
The CXO Playbook 2025 – Future-Ready Strategies for C-Suite Leaders Cerebrai...
MET 305 2019 SCHEME MODULE 2 COMPLETE.pptx
Construction Project Organization Group 2.pptx
composite construction of structures.pdf
Current and future trends in Computer Vision.pptx
Well-logging-methods_new................
PPT on Performance Review to get promotions
OOP with Java - Java Introduction (Basics)
Mechanical Engineering MATERIALS Selection
Enhancing Cyber Defense Against Zero-Day Attacks using Ensemble Neural Networks
CARTOGRAPHY AND GEOINFORMATION VISUALIZATION chapter1 NPTE (2).pptx
bas. eng. economics group 4 presentation 1.pptx
PRIZ Academy - 9 Windows Thinking Where to Invest Today to Win Tomorrow.pdf
Model Code of Practice - Construction Work - 21102022 .pdf

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.