Support Me ��


SUBSCRIBE NOW

JDBC in JAVA 1


JDBC in JAVA 1

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.

Java Application -> JDBC API -> DriverManager -> JDBC Driver -> Database.

Why use JDBC??

Before JDBC, ODBC API was the database API to connect and execute query with the database. But, ODBC API uses ODBC driver which is written in C language (i.e. platform dependent and unsecured). That is why Java has defined its own API (JDBC API) that uses JDBC drivers (written in Java language). 

What is API??

API (Application Programming Interface) is a document that contains description of all the features of a product or software. It represents classes and interfaces that software programs can follow to communicate with each other. An API can be created for applications, libraries, operating systems, etc.

What's new in JDBC 4.0 ??

JDBC 4.0 is new and advance specification of JDBC. It provides the following advance features.

1. Connection Management.

2. Auto loading of Driver Interface.

3. Better exception handling.

4. Support for large object.

5. Annotation in SQL query.

JDBC Driver

JDBC Driver is required to process SQL requests and generate result. The following are the different types of driver available in JDBC.

1. Type-1 Driver or JDBC-ODBC bridge.

2. Type-2 Driver or Native API Partly Java Driver.

3. Type-3 Driver or Network Protocol Driver.

4. Type-4 Driver or Thin Driver.

 

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

1. Easy to use.

2. Allow easy connectivity to all database supported by the ODBC Driver.


Disadvantage

1. Slow execution time.

2. Dependent on ODBC Driver.

3. Uses Java Native Interface(JNI) to make ODBC call.

 


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

1. faster as compared to Type-1 Driver.

2. Contains additional features.


Disadvantage

1. Requires native library.

2. Increased cost of Application.

 

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

1. Does not require any native library to be installed.

2. Database Independency.

3. Provide facility to switch over from one database to another database.


Disadvantage

1. Slow due to increase number of network call.

 


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

1. Does not require any native library.

2. Does not require any Middleware server.

3. Better Performance than other driver.


Disadvantage

1. Slow due to increase number of network call.

 

 

 

Dinesh Kumar S is a 23-year-old System Administrator who enjoys playing games, listening to music and learning new technology. He is friendly and generous, but can also be very lazy and crazy.

Share this

Backlinks

Website Design Company in Coimbatore
Website Design Company in Tamil nadu
Website Design Company in Karur
Website Design Company in Erode
Website Design Company in ooty
Website Design Company in theni
Website Design Company in thoothukudi
Website Design Company in Chennai
Website Design Company in Sathy
Website Design Company in Coimbatore Tamilnadu
Cheap Website Design Company in Coimbatore
Adsense Website Design Company in Coimbatore
ecommerce Website Design Company in Coimbatore
school Website Design Company in Coimbatore
Academy Website Design Company in Coimbatore
Test Website Design Company in Coimbatore
Best Website Design Company in Coimbatore
Adsense Website Design Company in Coimbatore
Adsense Website Design Company in Tamil nadu
Adsense Website Design Company in Karur
Adsense Website Design Company in Erode
Adsense Website Design Company in ooty
Adsense Website Design Company in theni
Adsense Website Design Company in thoothukudi
Adsense Website Design Company in Chennai
Adsense Website Design Company in Sathy
Free SEO Tools online
Free SEO Tools online Website
Free SEO Tools online Plagiarism
Free SEO Tools online article rewriter tool
Free SEO Tools online article reading and writing criticism
Free SEO Tools online seo backlink
Free SEO Tools online Free backlink maker
Free SEO Tools online seo backlink strategy
Free SEO Tools online content writting
360 help SEO Tools online Plagiarism checker
360 help SEO Tools online seo backlink
360 help SEO Tools online Free backlink maker
360 help SEO Tools online content writting
360 help SEO Tools online article rewriter tool
360 help SEO Tools
360 help SEO Tools India
360 help SEO Tools Tamil
360 help SEO Tools website