0% found this document useful (0 votes)
83 views2 pages

Practical No. 18: Write A Program To Insert and Retrieve Data From Database Using JDBC

This document outlines a practical on inserting and retrieving data from a database using JDBC. It discusses the significance of using JDBC over ODBC for Java applications. The practical aims to develop skills in applying JDBC to create tables and insert data. Students will learn to use various JDBC drivers and develop tiered applications. On completion, students will be able to write a program to insert and retrieve data from a database using JDBC. Relevant theoretical background on JDBC, drivers, and the steps for using JDBC are provided.

Uploaded by

Om Kawate
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
83 views2 pages

Practical No. 18: Write A Program To Insert and Retrieve Data From Database Using JDBC

This document outlines a practical on inserting and retrieving data from a database using JDBC. It discusses the significance of using JDBC over ODBC for Java applications. The practical aims to develop skills in applying JDBC to create tables and insert data. Students will learn to use various JDBC drivers and develop tiered applications. On completion, students will be able to write a program to insert and retrieve data from a database using JDBC. Relevant theoretical background on JDBC, drivers, and the steps for using JDBC are provided.

Uploaded by

Om Kawate
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Advanced Java Programming (22517)

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.

II. Relevant Program Outcomes (POs)


 Basic knowledge: Apply knowledge of basic mathematics, sciences and basic
engineering to solve the computer group related problems.
 Discipline knowledge: Apply Computer Programming knowledge to solve the
computer group related problems.
 Experiments and practice: Plan to perform experiments and practices to use the
results to solve the computer group related problems.
 Engineering tools: Apply relevant Computer programming / technologies and
tools with an understanding of the limitations.
 Individual and Team work: Function effectively as a leader and team member in
diverse/multidisciplinary teams.
 Communication: Communicate effectively in oral and written form.

III. Competency and Practical skills


To develop Dynamic web Application
The practical is expected to develop the following skills:
1. Able to apply the JDBC to create table , and insert data in a table.
2. Able to demonstrate the use of various JDBC driver and tier application.

IV. Relevant Course Outcome(s)


Develop programs using JDBC

V. Practical Outcome (PrOs)


Write a program to insert and retrieve data from database using JDBC

VI. Relevant Affective domain related Outcome(s)


1. Follow precautionary measures.
2. Follow naming conventions.
3. Follow ethical practices.

VII. Minimum Theoretical Background


JDBC API enables the application to interact with the different types of databases.
It is possible to publish vital information from a remote database on a webpage using the Java
applet. JDBC is a low level API is used to invoke or call SQL command directly. The
required SQL statements are passed as a 'string' to java methods.

Maharashtra state Board of Technical Education 95


Advanced Java Programming (22517)

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: -

 STEPS FOR USING JDBC


There are seven steps for using JDBC to access a database.
1. Import the Package: -
2. Register Driver or If register then load driver using Class.forName()-
3. Connect to Database:-
4. Create a Statement:-
5. .Execute the Statement:-
6. Retrieve the Results: -

VIII. Resources required (Additional)–

Nil

IX. Resources used (Additional)

Sr. Name of
Broad Specification Quantity Remarks (If any)
No. Resource
1 MS-Access MS-Office 2010

2 My-Sql Server My-Sql Sever above 5.5

Maharashtra state Board of Technical Education 96

You might also like