Java Programming_Lab 5_3 JDBC
Java Programming_Lab 5_3 JDBC
(CET2031B)
Java Programming 1
Lab 5
Problem Statement
Develop a simple web application using the concept of Servlets, JSP, and database
connectivity
Java Programming 2
Objective of the Assignment
Java Programming 3
JDBC
• JDBC stands for Java Database Connectivity. JDBC is a Java API
to connect and execute the query with the database. It is a
part of JavaSE (Java Standard Edition). JDBC API uses JDBC
drivers to connect with the database. There are four types of
JDBC drivers:
– JDBC-ODBC Bridge Driver,
– Native Driver,
– Network Protocol Driver, and
– Thin Driver
• We can use JDBC API to access tabular data stored in any
relational database. By the help of JDBC API, we can save,
update, delete and fetch data from the database. It is like
Open Database Connectivity (ODBC) provided by Microsoft.
Java Programming 4
JDBC
Java Programming 5
JDBC Interfaces and Classes
Java Programming 6
JDBC Driver
Java Programming 8
Java Database Connectivity with MySQL
Java Programming 9
Database Creation
Java Programming 10
Example to Connect Java Application with mysql database
2) Set classpath:
• There are two ways to set the classpath:
• Temporary
• Permanent
Java Programming 12
Thank You!!
Java Programming 13