Introduction to JDBC- an API provided by Java Language

15 1 0
                                        


JDBC or Java Database Connectivity could be a API significantly used for connecting Java Applications with wide selection of databases. JDBC is a Java program which is used to connect to a database to do all operations what you can perform manually at SQL prompt. You'll simply perform all the operations through a Java program like making tables, with some CRUD operations on the go. JDBC is an API specification developed by Sun and defines an even interface for accessing completely different relative databases.

JDBC Driver is needed to process SQL requests and generate result. JDBC driver implementations vary because of the wide selection of systems and hardware platforms during which Java operates. There four types of JDBC drivers that are discussed as

 Type-1 Driver

Type-1 Driver goes about as an bridge amongst JDBC and ODBC (Other Database Connectivity), this bridge is especially used to get to ODBC drivers introduced on every customer machine.This can be utilized in schools and universities where learning JDBC anyway isn't going about as in real-time.

 Type-2 Driver

The local API driver changes over JDBC orders into DBMS-particular local calls. This kind of driver is like the limitation of Type 1 drivers. The customer ought to have a type of PC code stacked on its machine.This seller particular driver must be introduced on every customer machine.

 Type-3 Driver

This kind of driver translates JDBC calls into a database-independent system convention that is sent to a middleware server. This server, at that point, translates this DBMS-specific protocol, which is then sent to a specific database. This is far away the most adaptable JDBC arrangement.

 Type-4 Driver

This type of driver is database subordinate and is for the most part given by the database vendors itself. This driver is normally called "Thin driver" as less code is executed and less interpretations exists. This driver by far gives better execution over some other driver.

An Introduction to JDBC in Java LanguageWhere stories live. Discover now