What is JDBC?
JDBC is Java application programming interface that allows the Java
programmers to access database management system from Java code.
Java Database Connectivity in short called as JDBC. It is a java API which enables the java programs to execute SQL statements. It is an application programming interface that defines how a java programmer can access the data base.
The Java application programming interface provides a mechanism for dynamically loading the correct Java packages and drivers and registering them with the JDBC Driver Manager that is used as a connection factory for creating JDBC connections which supports creating and executing statements such as SQL INSERT, UPDATE and DELETE. Driver Manager is the backbone of the jdbc architecture.
Java Database Connectivity is similar to Open Database Connectivity (ODBC) which is used for accessing and managing database, but the difference is that JDBC is designed specifically for Java programs, whereas ODBC is not depended upon any language.
What JDBC do ?
1. It helps to connect to the database.
2. It helps to execute queries and updating statements to the database
3. Retrieving and processing the results received from the database in terms of answering to your query.
There are three main steps to access Data Base using JDBC
1.Load JDBC Driver for Data base. If you want to connect ORACLE then you have to load ORACLE Driver. If MySQL then MySQL Driver.
2. Get Connection from Driver Manager
3. Execute the Query AND access the results
|