0% found this document useful (0 votes)
25 views7 pages

Introduction to Java Database Connectivity JDBC

Java Database Connectivity (JDBC) is an API that allows Java applications to interact with relational databases by executing SQL queries and managing data. It provides platform independence and supports multiple databases such as MySQL and Oracle. The architecture includes components like DriverManager, Connection, and various types of JDBC drivers to facilitate communication with databases.

Uploaded by

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

Introduction to Java Database Connectivity JDBC

Java Database Connectivity (JDBC) is an API that allows Java applications to interact with relational databases by executing SQL queries and managing data. It provides platform independence and supports multiple databases such as MySQL and Oracle. The architecture includes components like DriverManager, Connection, and various types of JDBC drivers to facilitate communication with databases.

Uploaded by

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

Java Database

Connectivity

B. Sadhana
2024MCA39
Introduction to Java
Database Connectivity
(JDBC)
•JDBC (Java Database Connectivity) is an API that enables Java
applications to interact with relational databases.

•It allows Java programs to execute SQL queries, retrieve


results, and perform database operations efficiently.

•JDBC provides a standardized way to connect to different


databases like MySQL, PostgreSQL, Oracle, and more.
Why Use JDBC?
1 Enables Database 2 Platform
Operations Independence
JDBC empowers Java JDBC (Java Database
applications to perform Connectivity) allows
crucial database Java programs to
functions. These connect to
include querying, databases, no
updating, and matter which
managing data. operating system
(Windows, Linux,
3 Multi-Database Support
macOS, etc.) is being
Connect to a wide array of databases. Options include
used.
MySQL, PostgreSQL, Oracle, and many others.
JDBC Architecture
JDBC API
Defines standard interfaces and classes. It provides the
blueprint for interaction.

Driver Manager
Manages drivers and connections. It acts as a central hub.

JDBC Drivers
Facilitates communication with databases. Different
types cater to specific needs.

Database
Stores and retrieves data. It is the core repository.
Types of JDBC Drivers
JDBC-ODBC Bridge Native API Driver Network Protocol Thin (Pure Java)

Uses ODBC to connect Uses vendor-specific Connect to the Connects directly to


the database. libraries to connect . It database over the the database. This is
works on specific network using middle the most common
platform- it is not server. type.
portable.
Key JDBC Components
DriverManager Connection
Manages database Represents an active
drivers. It establishes connection. This connects
connections between to the database.
applications and
databases.

Statement
Executes static SQL queries. It is for simple queries.
More JDBC Components

PreparedStatement ResultSet
Precompiled SQL statements. Holds data from a database
Allows dynamic queries with query. Enables navigation
parameters. through the results.

You might also like