JAVA AND JDBC:

 The combination of java with JDBC is very useful because it lets the programmer run his/her program on different platforms, Java programs are secure, robust, automatically downloaded from the network and java is a good language to create database applications. JDBC API enables Java applications to interact with different types of database. It is possible to publish vital information from a remote database on a web page using a java applet. With increasing inclination of programmers towards Java, knowledge about JDBC is essential.


Some of the advantages of using Java with JDBC are as follows:

• Easy and economical 

• Continued usage of already installed databases

 • Development time is short 

• Installation and version control simplified

How does JDBC work

                                         JDBC defines a set of API objects and methods to interact with the underlying database. A Java program first opens a connection to the database, makes a statement object, passes SQL statements to the underlying database management system (DBMS) through the statement object and retrieve the results as well as information about the result set.

     There are two types of interfaces – low –level interface and high-level interface. While high level interfaces are user-friendly,lowlevel interfaces are not. JDBC is a low-level API interface, ie. it used to invoke or call SQL commands directly. The required SQL statements are passed as strings to Java methods.

         Embedded SQL enables mixing of java into SQL statements. These statements are translated into JDBC calls using SQL Processor. In this type of direct mapping of relational database tables to java, each row of the table becomes an instance of the

class and each column value corresponds to an attribute of that instance. Mapping is being provided that makes rows of multiple tables to form a java class.