Practical No. 18: Write A Program To Insert and Retrieve Data From Database Using JDBC
Practical No. 18: Write A Program To Insert and Retrieve Data From Database Using JDBC
Practical No. 18: Write a program to insert and retrieve data from
database using JDBC.
I. Practical Significance:
ODBC isn't appropriate for direct use from the Java programming language because it
uses a C interface. The JDBC API was modeled after ODBC, but, because JDBC is a
Java API, it offers a natural Java interface for working with SQL. JDBC is needed to
provide a "pure Java" solution for application development.
Figure 12
Some of the current JDK add more features to JDBC that is embedded SQL which
makes direct mapping of relational databases to java classes. Embedded SQL enables
mixing of java into a SQL statement These statements are translated into JDBC calls
using SQL processor. In this type of direct mapping, each row of the table becomes
an instance of class and each column value corresponds to an attribute of that
instance.
JDBC DRIVERS:-
1. JDBC-ODBC Bridge: -.
2. Native-API: - partly java Driver: -
3. JDBC-Network pure java driver:
4. Native_protocol (100%) pure Java drivers: -
Nil
Sr. Name of
Broad Specification Quantity Remarks (If any)
No. Resource
1 MS-Access MS-Office 2010