Java U5 C
Java U5 C
Prativa Nyaupane
Outline
- JDBC Architecture
- JDBC Driver Types and Configuration
- Managing Connections and Statements
- Result Sets and Exception Handling
- DDL and DML Operations
- SQL Injection and Prepared Statements
- Row Sets and Transactions
- SQL Escapes
Introduction
- A database is an organized collection of data.
- Database Management System provides mechanisms for storing, retrieving and
modifying data for many users.
- DBMS allow for the access and storage of data without concern for the internal
representation of data.
- Relational DBMS stores data in tables. Tables are composed of rows and columns.
- Some popular RDBMSs are Microsoft SQL Server, Oracle, Sybase, PostgreSQL and
MySQL.
- The JAVA API is an interface which consists of description of all the characteristics of
the application. It is just a set of procedures that carry out specific tasks and make
development of applications easier.
JDBC API
- Java programs communicate with database and manipulate their data using
the Java Database Connectivity(JDBC) API.
- It allows any java program to execute SQL(Structured Query Language)
statements and retrieve results, modify data and delete data.
- The java.sql package contains classes and interfaces for JDBC API
Backend
Java application JDBC
database
● The JDBC API (Application Programming Interface) is a set of Java classes and
interfaces that define the standard methods and behaviors for database
connectivity.
● Each database vendor provides its own database driver, which needs to be
specific database.
Java Native Driver
● A Java Native Driver is a JDBC driver that is specifically designed to work
with a particular database management system (DBMS) using native
protocols.
● Disadvantage: